Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Add ShowByID filtering generation #3227

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pkg/datasources/secrets.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ func ReadSecrets(ctx context.Context, d *schema.ResourceData, meta any) diag.Dia
req := sdk.NewShowSecretRequest()

handleLike(d, &req.Like)
err := handleExtendedIn(d, &req.In)
err := handleExtendedIn(d, &req.ExtendedIn)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm open for discussions, but I'm not sure if it's necessary. On the other hand, in Snowflake, is just IN, and initially ExtendedIn was used only to distinguish from In with limited filtering capabilities.

Copy link
Collaborator Author

@sfc-gh-fbudzynski sfc-gh-fbudzynski Nov 28, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It will change how the filtering in the template is handled and how we should define filtering for the ShowBiIDFiltering struct. But it can be changed if it is preferred to leave the Extended In as before.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For me, it's more readable that way because I know it's the extended version, but both options are ok.

if err != nil {
return diag.FromErr(err)
}
Expand Down
7 changes: 7 additions & 0 deletions pkg/sdk/poc/generator/interface.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package generator

import "strings"

// Interface groups operations for particular object or objects family (e.g. DATABASE ROLE)
type Interface struct {
// Name is the interface's name, e.g. "DatabaseRoles"
Expand All @@ -25,3 +27,8 @@ func NewInterface(name string, nameSingular string, identifierKind string, opera
func (i *Interface) NameLowerCased() string {
return startingWithLowerCase(i.Name)
}

// ObjectIdentifierKind returns the level of the object identifier (e.g. for DatabaseObjectIdentifier, it returns "Database")
func (i *Interface) ObjectIdentifierKind() string {
return strings.Replace(i.IdentifierKind, "ObjectIdentifier", "", 1)
}
2 changes: 1 addition & 1 deletion pkg/sdk/poc/generator/keyword_builders.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ func (v *QueryStruct) OptionalIn() *QueryStruct {
}

func (v *QueryStruct) OptionalExtendedIn() *QueryStruct {
return v.PredefinedQueryStructField("In", "*ExtendedIn", KeywordOptions().SQL("IN"))
return v.PredefinedQueryStructField("ExtendedIn", "*ExtendedIn", KeywordOptions().SQL("IN"))
}

func (v *QueryStruct) OptionalStartsWith() *QueryStruct {
Expand Down
12 changes: 8 additions & 4 deletions pkg/sdk/poc/generator/operation.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ type Operation struct {
DescribeKind *DescriptionMappingKind
// DescribeMapping is a definition of mapping needed by Operation kind of OperationKindDescribe
DescribeMapping *Mapping
// ShowByIDFiltering defines a kind of filterings performed in ShowByID operation
ShowByIDFiltering []ShowByIDFiltering
}

type Mapping struct {
Expand Down Expand Up @@ -85,11 +87,11 @@ func addDescriptionMapping(op *Operation, from, to *Field) {
op.DescribeMapping = newMapping("convert", from, to)
}

func (i *Interface) newNoSqlOperation(kind string) *Interface {
func (i *Interface) newNoSqlOperation(kind string) *Operation {
operation := newOperation(kind, "placeholder").
withOptionsStruct(nil)
i.Operations = append(i.Operations, operation)
return i
return operation
}

func (i *Interface) newSimpleOperation(kind string, doc string, queryStruct *QueryStruct, helperStructs ...IntoField) *Interface {
Expand Down Expand Up @@ -160,8 +162,10 @@ func (i *Interface) ShowOperation(doc string, dbRepresentation *dbStruct, resour
return i
}

func (i *Interface) ShowByIdOperation() *Interface {
return i.newNoSqlOperation(string(OperationKindShowByID))
func (i *Interface) ShowByIdOperation(filtering ...ShowByIDFilteringKind) *Interface {
op := i.newNoSqlOperation(string(OperationKindShowByID))
op.withFiltering(filtering...)
return i
}

func (i *Interface) DescribeOperation(describeKind DescriptionMappingKind, doc string, dbRepresentation *dbStruct, resourceRepresentation *plainStruct, queryStruct *QueryStruct) *Interface {
Expand Down
46 changes: 46 additions & 0 deletions pkg/sdk/poc/generator/show_by_id_filtering.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
package generator

type ShowByIDFiltering struct {
Kind string
Args string
IdentifierBased bool
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if we could use an enum instead? What if we have more showByIDs which have a different behavior? Such flag could be confusing.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right, that would probably be a better approach than just a flag

}

type ShowByIDFilteringKind uint

const (
// Enables filtering with: Like
ShowByIDLikeFiltering ShowByIDFilteringKind = iota
// Enables filtering with: In
// Based on the identifier Kind
ShowByIDInFiltering
// Enables filtering with: ExtendedIn
// Based on the identifier Kind
ShowByIDExtendedInFiltering
Copy link
Collaborator

@sfc-gh-jmichalak sfc-gh-jmichalak Nov 27, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In your doc you proposed sth like

	ShowByIDSchemaFiltering     ShowByIDFilteringKind = "In{Schema: id.SchemaId()}"
	ShowByIDInDatabaseFiltering ShowByIDFilteringKind = "In{Database: id.DatabaseId()}"

I'm not saying it's bad, but I'm curious about the other approach here.

I wonder if we can separate these abstractions (one is database vs schema, and the other is in vs extended in)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we can skip the In vs. ExtendedIn because those filterings use different structs. For ExtendedIn, we need to provide the ExtendedIn struct, and for Simple In, just the In struct.

I aimed to make it similar in use to what we have for the ShowOperation:

g.NewQueryStruct("ShowSecret").
	...
	OptionalLike().
	OptionalExtendedIn(),

and then for the filtering we use:

).ShowByIdOperation(
	g.ShowByIDLikeFiltering,
	g.ShowByIDExtendedInFiltering,
)

)

func (s *Operation) withFiltering(filtering ...ShowByIDFilteringKind) *Operation {
for _, f := range filtering {
switch f {
case ShowByIDLikeFiltering:
s.ShowByIDFiltering = append(s.ShowByIDFiltering, ShowByIDFiltering{
Kind: "Like",
Args: "Pattern: String(id.Name())",
IdentifierBased: false,
})
case ShowByIDInFiltering:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can use it (non-extended In) in one object to show if it works.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good idea, i will generate some objects to show all the filtering options

s.ShowByIDFiltering = append(s.ShowByIDFiltering, ShowByIDFiltering{
Kind: "In",
Args: "%[1]v: id.%[1]vId()",
IdentifierBased: true,
})
case ShowByIDExtendedInFiltering:
s.ShowByIDFiltering = append(s.ShowByIDFiltering, ShowByIDFiltering{
Kind: "ExtendedIn",
Args: "In: In{%[1]v: id.%[1]vId()}",
IdentifierBased: true,
})
}
}
return s
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{{- /*gotype: github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/sdk/poc/generator.Interface*/ -}}

{{ $impl := .NameLowerCased }}

{{ range .Operations }}
{{ if and (eq .Name "Show") .ShowMapping }}
func (v *{{ $impl }}) Show(ctx context.Context, request *{{ .OptsField.DtoDecl }}) ([]{{ .ShowMapping.To.Name }}, error) {
Expand All @@ -13,9 +14,21 @@
return resultList, nil
}
{{ else if eq .Name "ShowByID" }}
{{ $idkind := .ObjectInterface.ObjectIdentifierKind }}
func (v *{{ $impl }}) ShowByID(ctx context.Context, id {{ .ObjectInterface.IdentifierKind }}) (*{{ .ObjectInterface.NameSingular }}, error) {
// TODO: adjust request if e.g. LIKE is supported for the resource
{{ $impl }}, err := v.Show(ctx, NewShow{{ .ObjectInterface.NameSingular }}Request())
request := NewShow{{ .ObjectInterface.NameSingular }}Request()
{{- if not .ShowByIDFiltering }}
// TODO: adjust request if e.g. LIKE is supported for the resource
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can leave the default behavior as it is, but we can point the SDK users to use g.ShowByIDLikeFiltering, and others more explicitly.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about: // TODO: adjust request if e.g. LIKE is supported for the resource with ShowByIDLikeFiltering and other filters for "ShowByIdOperation" in the definition file."

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good.

{{ else }}
{{- range .ShowByIDFiltering -}}
.{{- if .IdentifierBased }}
With{{ .Kind }}( {{ .Kind }} { {{ printf .Args $idkind }} })
{{- else }}
With{{ .Kind }}( {{ .Kind }} { {{ .Args }} })
{{- end }}
{{- end }}
{{- end }}
{{ $impl }}, err := v.Show(ctx, request)
if err != nil {
return nil, err
}
Expand Down
26 changes: 14 additions & 12 deletions pkg/sdk/secrets_def.go
Original file line number Diff line number Diff line change
Expand Up @@ -241,15 +241,17 @@ var SecretsDef = g.NewInterface(
SQL("SECRETS").
OptionalLike().
OptionalExtendedIn(),
).ShowByIdOperation().
DescribeOperation(
g.DescriptionMappingKindSingleValue,
"https://docs.snowflake.com/en/sql-reference/sql/desc-secret",
secretDetailsDbRow,
secretDetails,
g.NewQueryStruct("DescribeSecret").
Describe().
SQL("SECRET").
Name().
WithValidation(g.ValidIdentifier, "name"),
)
).DescribeOperation(
g.DescriptionMappingKindSingleValue,
"https://docs.snowflake.com/en/sql-reference/sql/desc-secret",
secretDetailsDbRow,
secretDetails,
g.NewQueryStruct("DescribeSecret").
Describe().
SQL("SECRET").
Name().
WithValidation(g.ValidIdentifier, "name"),
).ShowByIdOperation(
g.ShowByIDLikeFiltering,
g.ShowByIDExtendedInFiltering,
)
4 changes: 2 additions & 2 deletions pkg/sdk/secrets_dto_builders_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions pkg/sdk/secrets_dto_gen.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ type DropSecretRequest struct {
}

type ShowSecretRequest struct {
Like *Like
In *ExtendedIn
Like *Like
ExtendedIn *ExtendedIn
}

type DescribeSecretRequest struct {
Expand Down
10 changes: 5 additions & 5 deletions pkg/sdk/secrets_gen.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ type Secrets interface {
Alter(ctx context.Context, request *AlterSecretRequest) error
Drop(ctx context.Context, request *DropSecretRequest) error
Show(ctx context.Context, request *ShowSecretRequest) ([]Secret, error)
ShowByID(ctx context.Context, id SchemaObjectIdentifier) (*Secret, error)
Describe(ctx context.Context, id SchemaObjectIdentifier) (*SecretDetails, error)
ShowByID(ctx context.Context, id SchemaObjectIdentifier) (*Secret, error)
}

// CreateWithOAuthClientCredentialsFlowSecretOptions is based on https://docs.snowflake.com/en/sql-reference/sql/create-secret.
Expand Down Expand Up @@ -123,10 +123,10 @@ type DropSecretOptions struct {

// ShowSecretOptions is based on https://docs.snowflake.com/en/sql-reference/sql/show-secrets.
type ShowSecretOptions struct {
show bool `ddl:"static" sql:"SHOW"`
secrets bool `ddl:"static" sql:"SECRETS"`
Like *Like `ddl:"keyword" sql:"LIKE"`
In *ExtendedIn `ddl:"keyword" sql:"IN"`
show bool `ddl:"static" sql:"SHOW"`
secrets bool `ddl:"static" sql:"SECRETS"`
Like *Like `ddl:"keyword" sql:"LIKE"`
ExtendedIn *ExtendedIn `ddl:"keyword" sql:"IN"`
}
type secretDBRow struct {
CreatedOn time.Time `db:"created_on"`
Expand Down
2 changes: 1 addition & 1 deletion pkg/sdk/secrets_gen_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ func TestSecrets_Show(t *testing.T) {

t.Run("show with in", func(t *testing.T) {
opts := defaultOpts()
opts.In = &ExtendedIn{
opts.ExtendedIn = &ExtendedIn{
In: In{
Account: Bool(true),
},
Expand Down
27 changes: 14 additions & 13 deletions pkg/sdk/secrets_impl_gen.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,6 @@ func (v *secrets) Show(ctx context.Context, request *ShowSecretRequest) ([]Secre
return resultList, nil
}

func (v *secrets) ShowByID(ctx context.Context, id SchemaObjectIdentifier) (*Secret, error) {
request := NewShowSecretRequest().WithIn(ExtendedIn{In: In{Schema: id.SchemaId()}}).WithLike(Like{String(id.Name())})
secrets, err := v.Show(ctx, request)
if err != nil {
return nil, err
}
return collections.FindFirst(secrets, func(r Secret) bool { return r.Name == id.Name() })
}

func (v *secrets) Describe(ctx context.Context, id SchemaObjectIdentifier) (*SecretDetails, error) {
opts := &DescribeSecretOptions{
name: id,
Expand All @@ -72,14 +63,24 @@ func (v *secrets) Describe(ctx context.Context, id SchemaObjectIdentifier) (*Sec
return result.convert(), nil
}

func (v *secrets) ShowByID(ctx context.Context, id SchemaObjectIdentifier) (*Secret, error) {
request := NewShowSecretRequest().
WithLike(Like{Pattern: String(id.Name())}).
WithExtendedIn(ExtendedIn{In: In{Schema: id.SchemaId()}})
secrets, err := v.Show(ctx, request)
if err != nil {
return nil, err
}
return collections.FindFirst(secrets, func(r Secret) bool { return r.Name == id.Name() })
}

func (r *CreateWithOAuthClientCredentialsFlowSecretRequest) toOpts() *CreateWithOAuthClientCredentialsFlowSecretOptions {
opts := &CreateWithOAuthClientCredentialsFlowSecretOptions{
OrReplace: r.OrReplace,
IfNotExists: r.IfNotExists,
name: r.name,
ApiIntegration: r.ApiIntegration,

Comment: r.Comment,
Comment: r.Comment,
}

if r.OauthScopes != nil {
Expand Down Expand Up @@ -192,8 +193,8 @@ func (r *DropSecretRequest) toOpts() *DropSecretOptions {

func (r *ShowSecretRequest) toOpts() *ShowSecretOptions {
opts := &ShowSecretOptions{
Like: r.Like,
In: r.In,
Like: r.Like,
ExtendedIn: r.ExtendedIn,
}
return opts
}
Expand Down
24 changes: 12 additions & 12 deletions pkg/sdk/testint/secrets_gen_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -594,15 +594,15 @@ func TestInt_Secrets(t *testing.T) {
secret, secretCleanup := testClientHelper().Secret.CreateWithOAuthClientCredentialsFlow(t, id, integrationId, []sdk.ApiIntegrationScope{{Scope: "foo"}})
t.Cleanup(secretCleanup)

returnedSecrets, err := client.Secrets.Show(ctx, sdk.NewShowSecretRequest().WithIn(sdk.ExtendedIn{In: sdk.In{Account: sdk.Pointer(true)}}))
returnedSecrets, err := client.Secrets.Show(ctx, sdk.NewShowSecretRequest().WithExtendedIn(sdk.ExtendedIn{In: sdk.In{Account: sdk.Pointer(true)}}))
require.NoError(t, err)
require.Contains(t, returnedSecrets, *secret)

returnedSecrets, err = client.Secrets.Show(ctx, sdk.NewShowSecretRequest().WithIn(sdk.ExtendedIn{In: sdk.In{Database: id.DatabaseId()}}))
returnedSecrets, err = client.Secrets.Show(ctx, sdk.NewShowSecretRequest().WithExtendedIn(sdk.ExtendedIn{In: sdk.In{Database: id.DatabaseId()}}))
require.NoError(t, err)
require.Contains(t, returnedSecrets, *secret)

returnedSecrets, err = client.Secrets.Show(ctx, sdk.NewShowSecretRequest().WithIn(sdk.ExtendedIn{In: sdk.In{Schema: id.SchemaId()}}))
returnedSecrets, err = client.Secrets.Show(ctx, sdk.NewShowSecretRequest().WithExtendedIn(sdk.ExtendedIn{In: sdk.In{Schema: id.SchemaId()}}))
require.NoError(t, err)
require.Contains(t, returnedSecrets, *secret)
})
Expand All @@ -612,15 +612,15 @@ func TestInt_Secrets(t *testing.T) {
secret, secretCleanup := testClientHelper().Secret.CreateWithOAuthAuthorizationCodeFlow(t, id, integrationId, "foo", refreshTokenExpiryTime)
t.Cleanup(secretCleanup)

returnedSecrets, err := client.Secrets.Show(ctx, sdk.NewShowSecretRequest().WithIn(sdk.ExtendedIn{In: sdk.In{Account: sdk.Pointer(true)}}))
returnedSecrets, err := client.Secrets.Show(ctx, sdk.NewShowSecretRequest().WithExtendedIn(sdk.ExtendedIn{In: sdk.In{Account: sdk.Pointer(true)}}))
require.NoError(t, err)
require.Contains(t, returnedSecrets, *secret)

returnedSecrets, err = client.Secrets.Show(ctx, sdk.NewShowSecretRequest().WithIn(sdk.ExtendedIn{In: sdk.In{Database: id.DatabaseId()}}))
returnedSecrets, err = client.Secrets.Show(ctx, sdk.NewShowSecretRequest().WithExtendedIn(sdk.ExtendedIn{In: sdk.In{Database: id.DatabaseId()}}))
require.NoError(t, err)
require.Contains(t, returnedSecrets, *secret)

returnedSecrets, err = client.Secrets.Show(ctx, sdk.NewShowSecretRequest().WithIn(sdk.ExtendedIn{In: sdk.In{Schema: id.SchemaId()}}))
returnedSecrets, err = client.Secrets.Show(ctx, sdk.NewShowSecretRequest().WithExtendedIn(sdk.ExtendedIn{In: sdk.In{Schema: id.SchemaId()}}))
require.NoError(t, err)
require.Contains(t, returnedSecrets, *secret)
})
Expand All @@ -640,21 +640,21 @@ func TestInt_Secrets(t *testing.T) {
secretGenericString, secretCleanupWithGenericString := testClientHelper().Secret.CreateWithGenericString(t, testClientHelper().Ids.RandomSchemaObjectIdentifier(), "foo")
t.Cleanup(secretCleanupWithGenericString)

returnedSecrets, err := client.Secrets.Show(ctx, sdk.NewShowSecretRequest().WithIn(sdk.ExtendedIn{In: sdk.In{Account: sdk.Pointer(true)}}))
returnedSecrets, err := client.Secrets.Show(ctx, sdk.NewShowSecretRequest().WithExtendedIn(sdk.ExtendedIn{In: sdk.In{Account: sdk.Pointer(true)}}))
require.NoError(t, err)
require.Contains(t, returnedSecrets, *secretOAuthClientCredentials)
require.Contains(t, returnedSecrets, *secretOAuthAuthorizationCode)
require.Contains(t, returnedSecrets, *secretBasicAuthentication)
require.Contains(t, returnedSecrets, *secretGenericString)

returnedSecrets, err = client.Secrets.Show(ctx, sdk.NewShowSecretRequest().WithIn(sdk.ExtendedIn{In: sdk.In{Database: id.DatabaseId()}}))
returnedSecrets, err = client.Secrets.Show(ctx, sdk.NewShowSecretRequest().WithExtendedIn(sdk.ExtendedIn{In: sdk.In{Database: id.DatabaseId()}}))
require.NoError(t, err)
require.Contains(t, returnedSecrets, *secretOAuthClientCredentials)
require.Contains(t, returnedSecrets, *secretOAuthAuthorizationCode)
require.Contains(t, returnedSecrets, *secretBasicAuthentication)
require.Contains(t, returnedSecrets, *secretGenericString)

returnedSecrets, err = client.Secrets.Show(ctx, sdk.NewShowSecretRequest().WithIn(sdk.ExtendedIn{In: sdk.In{Schema: id.SchemaId()}}))
returnedSecrets, err = client.Secrets.Show(ctx, sdk.NewShowSecretRequest().WithExtendedIn(sdk.ExtendedIn{In: sdk.In{Schema: id.SchemaId()}}))
require.NoError(t, err)
require.Contains(t, returnedSecrets, *secretOAuthClientCredentials)
require.Contains(t, returnedSecrets, *secretOAuthAuthorizationCode)
Expand All @@ -667,15 +667,15 @@ func TestInt_Secrets(t *testing.T) {
secret, secretCleanup := testClientHelper().Secret.CreateWithGenericString(t, id, "foo")
t.Cleanup(secretCleanup)

returnedSecrets, err := client.Secrets.Show(ctx, sdk.NewShowSecretRequest().WithIn(sdk.ExtendedIn{In: sdk.In{Account: sdk.Pointer(true)}}))
returnedSecrets, err := client.Secrets.Show(ctx, sdk.NewShowSecretRequest().WithExtendedIn(sdk.ExtendedIn{In: sdk.In{Account: sdk.Pointer(true)}}))
require.NoError(t, err)
require.Contains(t, returnedSecrets, *secret)

returnedSecrets, err = client.Secrets.Show(ctx, sdk.NewShowSecretRequest().WithIn(sdk.ExtendedIn{In: sdk.In{Database: id.DatabaseId()}}))
returnedSecrets, err = client.Secrets.Show(ctx, sdk.NewShowSecretRequest().WithExtendedIn(sdk.ExtendedIn{In: sdk.In{Database: id.DatabaseId()}}))
require.NoError(t, err)
require.Contains(t, returnedSecrets, *secret)

returnedSecrets, err = client.Secrets.Show(ctx, sdk.NewShowSecretRequest().WithIn(sdk.ExtendedIn{In: sdk.In{Schema: id.SchemaId()}}))
returnedSecrets, err = client.Secrets.Show(ctx, sdk.NewShowSecretRequest().WithExtendedIn(sdk.ExtendedIn{In: sdk.In{Schema: id.SchemaId()}}))
require.NoError(t, err)
require.Contains(t, returnedSecrets, *secret)
})
Expand Down
Loading