Skip to content

Commit fa63a4c

Browse files
committed
fix
1 parent 8df2e91 commit fa63a4c

20 files changed

+68
-887
lines changed

.secrets.baseline

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@
268268
"filename": "internal/central/pkg/services/centralservice_moq.go",
269269
"hashed_secret": "44e17306b837162269a410204daaa5ecee4ec22c",
270270
"is_verified": false,
271-
"line_number": 1180
271+
"line_number": 1085
272272
}
273273
],
274274
"pkg/client/fleetmanager/impl/testdata/token": [
@@ -391,5 +391,5 @@
391391
}
392392
]
393393
},
394-
"generated_at": "2025-06-10T08:35:01Z"
394+
"generated_at": "2025-08-26T17:34:57Z"
395395
}

e2e/dns/record_cleanup.go

Lines changed: 0 additions & 40 deletions
This file was deleted.

e2e/dns/records_loader.go

Lines changed: 0 additions & 112 deletions
This file was deleted.

e2e/e2e_test.go

Lines changed: 0 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ import (
1616
. "github.com/onsi/ginkgo/v2"
1717
. "github.com/onsi/gomega"
1818
openshiftRouteV1 "github.com/openshift/api/route/v1"
19-
"github.com/stackrox/acs-fleet-manager/e2e/dns"
2019
"github.com/stackrox/acs-fleet-manager/e2e/testutil"
2120
"github.com/stackrox/acs-fleet-manager/fleetshard/pkg/k8s"
2221
"github.com/stackrox/acs-fleet-manager/internal/central/constants"
@@ -200,30 +199,6 @@ var _ = Describe("Central", Ordered, func() {
200199
Should(Succeed())
201200
})
202201

203-
It("should have created AWS Route53 records", func() {
204-
testutil.SkipIf(!dnsEnabled, testutil.SkipDNSMsg)
205-
206-
var centralRequest public.CentralRequest
207-
Expect(testutil.GetCentralRequest(ctx, client, centralRequestID, &centralRequest)).
208-
To(Succeed())
209-
210-
var reencryptIngress openshiftRouteV1.RouteIngress
211-
Eventually(testutil.AssertReencryptIngressRouteExist(context.Background(), routeService, centralRequest, &reencryptIngress)).
212-
WithTimeout(waitTimeout).
213-
WithPolling(defaultPolling).
214-
Should(Succeed())
215-
216-
dnsRecordsLoader := dns.NewRecordsLoader(route53Client, centralRequest)
217-
218-
Eventually(dnsRecordsLoader.LoadDNSRecords).
219-
WithTimeout(waitTimeout).
220-
WithPolling(defaultPolling).
221-
Should(HaveLen(len(dnsRecordsLoader.CentralDomainNames)), "Started at %s", time.Now())
222-
223-
recordSets := dnsRecordsLoader.LastResult
224-
testutil.AssertDNSMatchesRouter(dnsRecordsLoader.CentralDomainNames, recordSets, &reencryptIngress)
225-
})
226-
227202
It("should backup important secrets in FM database", func() {
228203
expectedSecrets := k8s.NewSecretBackup(k8sClient, false).GetWatchedSecrets()
229204
Eventually(assertStoredSecrets(ctx, privateAPI, centralRequestID, expectedSecrets)).
@@ -348,18 +323,6 @@ var _ = Describe("Central", Ordered, func() {
348323
Should(Succeed())
349324
})
350325

351-
It("should delete external DNS entries", func() {
352-
testutil.SkipIf(!dnsEnabled, testutil.SkipDNSMsg)
353-
var centralRequest public.CentralRequest
354-
Expect(testutil.GetCentralRequest(ctx, client, centralRequestID, &centralRequest)).
355-
To(Succeed())
356-
dnsRecordsLoader := dns.NewRecordsLoader(route53Client, centralRequest)
357-
Eventually(dnsRecordsLoader.LoadDNSRecords).
358-
WithTimeout(waitTimeout).
359-
WithPolling(defaultPolling).
360-
Should(BeEmpty(), "Started at %s", time.Now())
361-
})
362-
363326
AfterAll(func() {
364327
Expect(restoreDefaultGitopsConfig()).To(Succeed())
365328
})
@@ -428,18 +391,6 @@ var _ = Describe("Central", Ordered, func() {
428391
Should(Succeed())
429392
})
430393

431-
It("should delete external DNS entries", func() {
432-
testutil.SkipIf(!dnsEnabled, testutil.SkipDNSMsg)
433-
var centralRequest public.CentralRequest
434-
Expect(testutil.GetCentralRequest(ctx, client, centralRequestID, &centralRequest)).
435-
To(Succeed())
436-
dnsRecordsLoader := dns.NewRecordsLoader(route53Client, centralRequest)
437-
Eventually(dnsRecordsLoader.LoadDNSRecords).
438-
WithTimeout(waitTimeout).
439-
WithPolling(defaultPolling).
440-
Should(BeEmpty(), "Started at %s", time.Now())
441-
})
442-
443394
It("should be restorable", func() {
444395
By("calling the admin restore API", func() {
445396
res, err := adminAPI.RestoreCentral(ctx, centralRequestID)
@@ -468,17 +419,6 @@ var _ = Describe("Central", Ordered, func() {
468419
Should(Succeed())
469420
})
470421

471-
By("deleting external DNS entries", func() {
472-
testutil.SkipIf(!dnsEnabled, testutil.SkipDNSMsg)
473-
var centralRequest public.CentralRequest
474-
Expect(testutil.GetCentralRequest(ctx, client, centralRequestID, &centralRequest)).
475-
To(Succeed())
476-
dnsRecordsLoader := dns.NewRecordsLoader(route53Client, centralRequest)
477-
Eventually(dnsRecordsLoader.LoadDNSRecords).
478-
WithTimeout(waitTimeout).
479-
WithPolling(defaultPolling).
480-
Should(BeEmpty(), "Started at %s", time.Now())
481-
})
482422
})
483423

484424
})
@@ -551,14 +491,6 @@ var _ = Describe("Central", Ordered, func() {
551491
Expect(k8sClient.Delete(ctx, namespace)).ToNot(HaveOccurred())
552492
})
553493

554-
It("should delete external DNS entries", func() {
555-
testutil.SkipIf(!dnsEnabled, testutil.SkipDNSMsg)
556-
dnsRecordsLoader := dns.NewRecordsLoader(route53Client, readyCentralRequest)
557-
Eventually(dnsRecordsLoader.LoadDNSRecords).
558-
WithTimeout(waitTimeout).
559-
WithPolling(defaultPolling).
560-
Should(BeEmpty(), "Started at %s", time.Now())
561-
})
562494
})
563495
})
564496

e2e/multicluster/multicluster_migration_test.go

Lines changed: 4 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import (
99
. "github.com/onsi/ginkgo/v2"
1010
. "github.com/onsi/gomega"
1111
openshiftRouteV1 "github.com/openshift/api/route/v1"
12-
"github.com/stackrox/acs-fleet-manager/e2e/dns"
1312
"github.com/stackrox/acs-fleet-manager/e2e/testutil"
1413
"github.com/stackrox/acs-fleet-manager/fleetshard/pkg/k8s"
1514
"github.com/stackrox/acs-fleet-manager/internal/central/pkg/api/admin/private"
@@ -64,11 +63,6 @@ var _ = Describe("Central Migration Test", Ordered, func() {
6463
})
6564

6665
AfterAll(func() {
67-
// if the Id is empty we've never successfully created a CentralRequest, thus no cleanup necessary
68-
if dnsEnabled && centralRequest.Id != "" {
69-
dns.CleanupCentralRequestRecords(route53Client, centralRequest)
70-
}
71-
7266
for _, note := range notes {
7367
GinkgoWriter.Println(note)
7468
}
@@ -104,11 +98,9 @@ var _ = Describe("Central Migration Test", Ordered, func() {
10498
Should(Succeed())
10599
})
106100

107-
It("should have DNS CNAME records for cluster1 routes", func() {
108-
testutil.SkipIf(!dnsEnabled, testutil.SkipDNSMsg)
101+
It("should have routes configured on cluster1", func() {
109102
testutil.GetCentralRequest(context.Background(), fleetmanagerClient, centralRequest.Id, &centralRequest)
110103

111-
dnsRecordsLoader := dns.NewRecordsLoader(route53Client, centralRequest)
112104
routeService := k8s.NewRouteService(cluster1KubeClient)
113105

114106
var reencryptIngress openshiftRouteV1.RouteIngress
@@ -117,12 +109,7 @@ var _ = Describe("Central Migration Test", Ordered, func() {
117109
WithPolling(defaultPolling).
118110
Should(Succeed())
119111

120-
Eventually(dnsRecordsLoader.LoadDNSRecords).
121-
WithTimeout(waitTimeout).
122-
WithPolling(3 * defaultPolling).
123-
Should(HaveLen(len(dnsRecordsLoader.CentralDomainNames)))
124-
125-
testutil.AssertDNSMatchesRouter(dnsRecordsLoader.CentralDomainNames, dnsRecordsLoader.LastResult, &reencryptIngress)
112+
GinkgoWriter.Printf("Route host configured: %s\n", reencryptIngress.Host)
126113
})
127114
})
128115

@@ -155,11 +142,9 @@ var _ = Describe("Central Migration Test", Ordered, func() {
155142
WithPolling(defaultPolling).
156143
Should(Succeed())
157144
})
158-
It("should have DNS CNAME records for cluster2 routes", func() {
159-
testutil.SkipIf(!dnsEnabled, testutil.SkipDNSMsg)
145+
It("should have routes configured on cluster2", func() {
160146
testutil.GetCentralRequest(context.Background(), fleetmanagerClient, centralRequest.Id, &centralRequest)
161147

162-
dnsRecordsLoader := dns.NewRecordsLoader(route53Client, centralRequest)
163148
routeService := k8s.NewRouteService(cluster2KubeClient)
164149

165150
var reencryptIngress openshiftRouteV1.RouteIngress
@@ -168,12 +153,7 @@ var _ = Describe("Central Migration Test", Ordered, func() {
168153
WithPolling(defaultPolling).
169154
Should(Succeed())
170155

171-
Eventually(dnsRecordsLoader.LoadDNSRecords).
172-
WithTimeout(waitTimeout).
173-
WithPolling(3 * defaultPolling).
174-
Should(HaveLen(len(dnsRecordsLoader.CentralDomainNames)))
175-
176-
testutil.AssertDNSMatchesRouter(dnsRecordsLoader.CentralDomainNames, dnsRecordsLoader.LastResult, &reencryptIngress)
156+
GinkgoWriter.Printf("Route host configured: %s\n", reencryptIngress.Host)
177157
})
178158
})
179159

0 commit comments

Comments
 (0)