mirror of
https://github.com/Rain-kl/OpenFlare.git
synced 2026-09-30 14:26:36 +08:00
feat: enhance apply logs and config versions features
- Add detailed diff reporting for OpenResty options in TestPreviewAndDiffConfigVersion. - Update ApplyLogsPage to display additional log details including checksums and support file counts. - Introduce ConfigVersionSnapshotModal for viewing configuration snapshots. - Refactor config versions page to utilize new snapshot modal and improve option diff display. - Extend ApplyLogItem type to include checksums and support file count. - Enhance NodeDetailPage to show target version details and checksums.
This commit is contained in:
@@ -221,6 +221,21 @@ func TestPreviewAndDiffConfigVersion(t *testing.T) {
|
||||
if len(diff.ChangedOptionKeys) == 0 || diff.ChangedOptionKeys[0] == "" {
|
||||
t.Fatal("expected changed OpenResty option keys to be reported")
|
||||
}
|
||||
if len(diff.ChangedOptionDetails) == 0 {
|
||||
t.Fatal("expected changed OpenResty option details to be reported")
|
||||
}
|
||||
found := false
|
||||
for _, item := range diff.ChangedOptionDetails {
|
||||
if item.Key == "OpenRestyProxyReadTimeout" {
|
||||
found = true
|
||||
if item.PreviousValue != "60" || item.CurrentValue != "120" {
|
||||
t.Fatalf("unexpected option diff values: %+v", item)
|
||||
}
|
||||
}
|
||||
}
|
||||
if !found {
|
||||
t.Fatal("expected OpenRestyProxyReadTimeout diff detail")
|
||||
}
|
||||
}
|
||||
|
||||
func TestCreateTLSCertificateRejectsInvalidPEM(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user