From 2bcabd315fd96fed667e360e3f39b31161a53193 Mon Sep 17 00:00:00 2001 From: Vitaly Antonenko Date: Wed, 3 Apr 2024 20:51:01 +0300 Subject: [PATCH] Remove name from DeleteSercretStructure --- internal/juju/secrets.go | 3 +-- internal/juju/secrets_test.go | 4 +--- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/internal/juju/secrets.go b/internal/juju/secrets.go index de772585..a8a49b79 100644 --- a/internal/juju/secrets.go +++ b/internal/juju/secrets.go @@ -67,7 +67,6 @@ type UpdateSecretInput struct { type DeleteSecretInput struct { SecretId string ModelName string - Name string } func newSecretsClient(sc SharedClient) *secretsClient { @@ -191,7 +190,7 @@ func (c *secretsClient) DeleteSecret(input *DeleteSecretInput) error { return err } // TODO: think about removing concrete revision. - err = secretAPIClient.RemoveSecret(secretURI, input.Name, nil) + err = secretAPIClient.RemoveSecret(secretURI, "", nil) if !errors.Is(err, jujuerrors.NotFound) { return typedError(err) } diff --git a/internal/juju/secrets_test.go b/internal/juju/secrets_test.go index f5a05993..5c780688 100644 --- a/internal/juju/secrets_test.go +++ b/internal/juju/secrets_test.go @@ -224,19 +224,17 @@ func (s *SecretSuite) TestDeleteSecret() { ctlr := s.setupMocks(s.T()) defer ctlr.Finish() - secretName := "test-secret" secretId := "secret:9m4e2mr0ui3e8a215n4g" secretURI, err := coresecrets.ParseURI(secretId) s.Require().NoError(err) - s.mockSecretClient.EXPECT().RemoveSecret(secretURI, secretName, nil).Return(nil).AnyTimes() + s.mockSecretClient.EXPECT().RemoveSecret(secretURI, "", nil).Return(nil).AnyTimes() client := s.getSecretsClient() err = client.DeleteSecret(&DeleteSecretInput{ SecretId: secretId, ModelName: s.testModelName, - Name: secretName, }) s.Assert().NoError(err) }