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

Commit

Permalink
Cleaning up.
Browse files Browse the repository at this point in the history
  • Loading branch information
JasonTheDeveloper committed Nov 26, 2019
1 parent 47777d4 commit 61e239a
Showing 1 changed file with 4 additions and 21 deletions.
25 changes: 4 additions & 21 deletions controllers/secretscope_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,9 @@ import (
databricksv1alpha1 "github.com/microsoft/azure-databricks-operator/api/v1alpha1"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
databricks "github.com/xinsnake/databricks-sdk-golang"
dbazure "github.com/xinsnake/databricks-sdk-golang/azure"
v1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/types"
"os"
)

var _ = Describe("SecretScope Controller", func() {
Expand Down Expand Up @@ -81,18 +78,11 @@ var _ = Describe("SecretScope Controller", func() {
Context("Secret Scope with ACLs", func() {
It("Should handle scope and ACLs correctly", func() {

var o databricks.DBClientOption
o.Host = os.Getenv("DATABRICKS_HOST")
o.Token = os.Getenv("DATABRICKS_TOKEN")
e := apiClient.Secrets().DeleteSecretScope(aclKeyName)

var APIClient dbazure.DBClient
APIClient.Init(o)
fmt.Println(e)

_, err := APIClient.Secrets().ListSecretACLs(aclKeyName)

fmt.Println(err)

l, _ := APIClient.Secrets().ListSecretScopes()
l, _ := apiClient.Secrets().ListSecretScopes()

fmt.Println(l)

Expand Down Expand Up @@ -370,14 +360,7 @@ var _ = Describe("SecretScope Controller", func() {
Context("Secret Scope with ACLs", func() {
It("Should fail if secret scope exist in Databricks", func() {

var o databricks.DBClientOption
o.Host = os.Getenv("DATABRICKS_HOST")
o.Token = os.Getenv("DATABRICKS_TOKEN")

var APIClient dbazure.DBClient
APIClient.Init(o)

Expect(APIClient.Secrets().CreateSecretScope(aclKeyName, "users")).Should(Succeed())
Expect(apiClient.Secrets().CreateSecretScope(aclKeyName, "users")).Should(Succeed())

spec := databricksv1alpha1.SecretScopeSpec{
InitialManagePrincipal: "users",
Expand Down

0 comments on commit 61e239a

Please sign in to comment.