Skip to content

Commit 07fe89a

Browse files
Remove deprecated "set-public-access-cidrs" integration tests (#8311)
Remove deprecated "set-public-access-cidrs" tests Signed-off-by: Adam Crowder <[email protected]>
1 parent ace99cf commit 07fe89a

File tree

1 file changed

+0
-61
lines changed

1 file changed

+0
-61
lines changed

integration/tests/crud/creategetdelete_test.go

-61
Original file line numberDiff line numberDiff line change
@@ -500,67 +500,6 @@ var _ = Describe("(Integration) Create, Get, Scale & Delete", func() {
500500
})
501501
})
502502

503-
Context("configuring K8s API", Serial, Ordered, func() {
504-
var (
505-
k8sAPICall func() error
506-
)
507-
508-
BeforeAll(func() {
509-
cfg := makeClusterConfig()
510-
511-
ctl, err := eks.New(context.TODO(), &api.ProviderConfig{Region: params.Region}, cfg)
512-
Expect(err).NotTo(HaveOccurred())
513-
514-
err = ctl.RefreshClusterStatus(context.Background(), cfg)
515-
Expect(err).ShouldNot(HaveOccurred())
516-
517-
clientSet, err := ctl.NewStdClientSet(cfg)
518-
Expect(err).ShouldNot(HaveOccurred())
519-
520-
k8sAPICall = func() error {
521-
_, err = clientSet.CoreV1().ServiceAccounts(metav1.NamespaceDefault).List(context.TODO(), metav1.ListOptions{})
522-
return err
523-
}
524-
})
525-
526-
AfterAll(func() {
527-
// When the disable public access test below fails, the re-enable public access test is skipped so the
528-
// cluster is left in a state where the API server is unreachable. This causes some of the tests later
529-
// to fail as well. To avoid this, we need to re-enable public access here so calls to the API
530-
// server can be made in subsequent tests.
531-
Expect(params.EksctlUtilsCmd.WithArgs(
532-
"set-public-access-cidrs",
533-
"--cluster", params.ClusterName,
534-
"0.0.0.0/0",
535-
"--approve",
536-
)).To(RunSuccessfully())
537-
})
538-
539-
It("should have public access by default", func() {
540-
Expect(k8sAPICall()).ShouldNot(HaveOccurred())
541-
})
542-
543-
It("should disable public access", func() {
544-
Expect(params.EksctlUtilsCmd.WithArgs(
545-
"set-public-access-cidrs",
546-
"--cluster", params.ClusterName,
547-
"1.1.1.1/32,2.2.2.0/24",
548-
"--approve",
549-
)).To(RunSuccessfully())
550-
Eventually(k8sAPICall, "5m", "20s").Should(HaveOccurred())
551-
})
552-
553-
It("should re-enable public access", func() {
554-
Expect(params.EksctlUtilsCmd.WithArgs(
555-
"set-public-access-cidrs",
556-
"--cluster", params.ClusterName,
557-
"0.0.0.0/0",
558-
"--approve",
559-
)).To(RunSuccessfully())
560-
Expect(k8sAPICall()).ShouldNot(HaveOccurred())
561-
})
562-
})
563-
564503
Context("configuring Cloudwatch logging", Serial, Ordered, func() {
565504
var (
566505
cfg *api.ClusterConfig

0 commit comments

Comments
 (0)