Skip to content
This repository has been archived by the owner on Nov 27, 2024. It is now read-only.

Commit

Permalink
e2e: enhance support for GenerateName in cli (#138)
Browse files Browse the repository at this point in the history
Signed-off-by: Francesco Ilario <filario@redhat.com>
  • Loading branch information
filariow authored May 16, 2024
1 parent cef4037 commit 759a967
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion e2e/pkg/cli/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ func (c *Cli) List(ctx context.Context, list client.ObjectList, opts ...client.L
// Create saves the object obj in the Kubernetes cluster. obj must be a
// struct pointer so that obj can be updated with the content returned by the Server.
func (c *Cli) Create(ctx context.Context, obj client.Object, opts ...client.CreateOption) error {
obj.SetName(c.EnsurePrefix(obj.GetName()))
if obj.GetName() != "" {
obj.SetName(c.EnsurePrefix(obj.GetName()))
}
return c.Client.Create(ctx, obj, opts...)
}

Expand Down

0 comments on commit 759a967

Please sign in to comment.