Skip to content
This repository was archived by the owner on Jan 28, 2022. It is now read-only.

Commit 140973f

Browse files
Debug why my tests aren't working.
1 parent 509d813 commit 140973f

File tree

1 file changed

+20
-4
lines changed

1 file changed

+20
-4
lines changed

controllers/secretscope_controller_test.go

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@ import (
2424
databricksv1alpha1 "github.com/microsoft/azure-databricks-operator/api/v1alpha1"
2525
. "github.com/onsi/ginkgo"
2626
. "github.com/onsi/gomega"
27-
// databricks "github.com/xinsnake/databricks-sdk-golang"
28-
// dbazure "github.com/xinsnake/databricks-sdk-golang/azure"
29-
// v1 "k8s.io/api/core/v1"
27+
databricks "github.com/xinsnake/databricks-sdk-golang"
28+
dbazure "github.com/xinsnake/databricks-sdk-golang/azure"
29+
v1 "k8s.io/api/core/v1"
3030
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
3131
"k8s.io/apimachinery/pkg/types"
32-
// "os"
32+
"os"
3333
)
3434

3535
var _ = Describe("SecretScope Controller", func() {
@@ -80,6 +80,22 @@ var _ = Describe("SecretScope Controller", func() {
8080
// test Kubernetes API server, which isn't the goal here.
8181
Context("Secret Scope with ACLs", func() {
8282
It("Should handle scope and ACLs correctly", func() {
83+
84+
var o databricks.DBClientOption
85+
o.Host = os.Getenv("DATABRICKS_HOST")
86+
o.Token = os.Getenv("DATABRICKS_TOKEN")
87+
88+
var APIClient dbazure.DBClient
89+
APIClient.Init(o)
90+
91+
_, err := APIClient.Secrets().ListSecretACLs(aclKeyName)
92+
93+
fmt.Println(err)
94+
95+
l, _ := APIClient.Secrets().ListSecretScopes()
96+
97+
fmt.Println(l)
98+
8399
spec := databricksv1alpha1.SecretScopeSpec{
84100
InitialManagePrincipal: "users",
85101
SecretScopeSecrets: make([]databricksv1alpha1.SecretScopeSecret, 0),

0 commit comments

Comments
 (0)