From 89a543152a71b0987807d1c6e513827072fb3edd Mon Sep 17 00:00:00 2001 From: punkwalker Date: Fri, 27 Dec 2024 10:44:00 -0800 Subject: [PATCH] fix: update secret struct Signed-off-by: punkwalker --- pkg/cmd/get/secrets.go | 3 --- tests/e2e/e2e.go | 6 +++--- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/pkg/cmd/get/secrets.go b/pkg/cmd/get/secrets.go index 6ccecb19..c51bd749 100644 --- a/pkg/cmd/get/secrets.go +++ b/pkg/cmd/get/secrets.go @@ -47,11 +47,8 @@ var ( ) type TemplateData struct { - IsCore bool `json:"isCore"` Name string `json:"name"` Namespace string `json:"namespace"` - Username string `json:"username"` - Password string `json:"password"` Data map[string]string `json:"data"` } diff --git a/tests/e2e/e2e.go b/tests/e2e/e2e.go index d8c50c4f..d25ff48a 100644 --- a/tests/e2e/e2e.go +++ b/tests/e2e/e2e.go @@ -18,7 +18,7 @@ import ( "code.gitea.io/sdk/gitea" argov1alpha1 "github.com/cnoe-io/argocd-api/api/argo/application/v1alpha1" - "github.com/cnoe-io/idpbuilder/pkg/cmd/get" + "github.com/cnoe-io/idpbuilder/pkg/entity" "github.com/cnoe-io/idpbuilder/pkg/k8s" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -268,7 +268,7 @@ func GetBasicAuth(ctx context.Context, name string) (BasicAuth, error) { } out := BasicAuth{} - secs := make([]get.TemplateData, 2) + secs := make([]entity.Secret, 2) if err = json.Unmarshal(b, &secs); err != nil { lastErr = err time.Sleep(httpRetryDelay) @@ -383,7 +383,7 @@ func TestGiteaRegistry(ctx context.Context, t *testing.T, cmd, giteaHost, giteaP b, err := RunCommand(ctx, fmt.Sprintf("%s get secrets -o json -p gitea", IdpbuilderBinaryLocation), 10*time.Second) assert.NoError(t, err) - secs := make([]get.TemplateData, 2) + secs := make([]entity.Secret, 1) err = json.Unmarshal(b, &secs) assert.NoError(t, err)