Skip to content

Commit

Permalink
fix metrics-helper test to detach role policy early (#2121)
Browse files Browse the repository at this point in the history
  • Loading branch information
sushrk authored Oct 27, 2022
1 parent 9bee3e4 commit c959487
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions test/integration/metrics-helper/metrics_helper_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,13 +142,14 @@ var _ = BeforeSuite(func() {
})

var _ = AfterSuite(func() {
k8sUtil.RemoveVarFromDaemonSetAndWaitTillUpdated(f, utils.AwsNodeName, utils.AwsNodeNamespace,
utils.AwsNodeName, map[string]struct{}{"SOME_NON_EXISTENT_VAR": {}})

By("detaching role policy from the node IAM Role")
err = f.CloudServices.IAM().DetachRolePolicy(policyARN, ngRoleName)
Expect(err).ToNot(HaveOccurred())

k8sUtil.RemoveVarFromDaemonSetAndWaitTillUpdated(f, utils.AwsNodeName, utils.AwsNodeNamespace,
utils.AwsNodeName, map[string]struct{}{"SOME_NON_EXISTENT_VAR": {}})

By("uninstalling cni-metrics-helper using helm")
err := f.InstallationManager.UnInstallCNIMetricsHelper()
Expect(err).ToNot(HaveOccurred())
Expand Down

0 comments on commit c959487

Please sign in to comment.