Skip to content

Commit

Permalink
Add secret scope cleanup as per Azure#101
Browse files Browse the repository at this point in the history
  • Loading branch information
stuartleeks committed Nov 25, 2019
1 parent 466cdee commit b64f120
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions controllers/secretscope_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,32 @@ var _ = Describe("SecretScope Controller", func() {
keys := []string{aclKeyName, secretsKeyName}
for _, value := range keys {
_ = apiClient.Secrets().DeleteSecretScope(value)

ss := &databricksv1alpha1.SecretScope{
ObjectMeta: metav1.ObjectMeta{
Name: value,
Namespace: "default",
},
}
_ = k8sClient.Delete(context.Background(), ss)
}
})

AfterEach(func() {
// Add any teardown steps that needs to be executed after each test
keys := []string{aclKeyName, secretsKeyName}
for _, value := range keys {
_ = apiClient.Secrets().DeleteSecretScope(value)

ss := &databricksv1alpha1.SecretScope{
ObjectMeta: metav1.ObjectMeta{
Name: value,
Namespace: "default",
},
}

_ = k8sClient.Delete(context.Background(), ss)
}
})

// Add Tests for OpenAPI validation (or additional CRD features) specified in
Expand Down

0 comments on commit b64f120

Please sign in to comment.