Skip to content
Merged
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
16 changes: 5 additions & 11 deletions e2e/nomostest/gitproviders/secure_source_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,17 +121,11 @@ func (c *SSMClient) CreateRepository(name string) (string, error) {
return fullName, nil
}

// DeleteRepositories calls the gcloud SDK to delete the provided repositories from SSM.
func (c *SSMClient) DeleteRepositories(names ...string) error {
for _, name := range names {
_, err := c.shell.ExecWithDebug("gcloud", "beta", "source-manager", "repos",
"delete", name,
"--region", c.region,
"--project", c.project)
if err != nil {
return fmt.Errorf("deleting source repository: %w", err)
}
}
// DeleteRepositories is a no-op because SSM repo names are determined by the
// test cluster name and RSync namespace and name, so it can be reused if it
// failed to be deleted after the test.
func (c *SSMClient) DeleteRepositories(_ ...string) error {
c.shell.Logger.Info("[SSM] Skip deletion of repos")
return nil
}

Expand Down