Skip to content

Commit

Permalink
don't remove cluster folder after delete
Browse files Browse the repository at this point in the history
  • Loading branch information
tatlat committed Feb 14, 2024
1 parent a0db542 commit 6f877a7
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 9 deletions.
1 change: 0 additions & 1 deletion pkg/workflows/management/create_delete_bootstrap.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ func (s *deleteBootstrapClusterForDeleteTask) Run(ctx context.Context, commandCo
return &workflows.CollectMgmtClusterDiagnosticsTask{}
}

commandContext.Writer.CleanUp()
logger.MarkSuccess("Cluster deleted!")
return nil
}
Expand Down
3 changes: 0 additions & 3 deletions pkg/workflows/management/delete_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,6 @@ func (c *deleteTestSetup) expectSaveLogsManagement() {

func (c *deleteTestSetup) expectDeleteBootstrap(err error) {
c.bootstrapper.EXPECT().DeleteBootstrapCluster(c.ctx, c.bootstrapCluster, constants.Delete, false).Return(err)
if err == nil {
c.writer.EXPECT().CleanUp()
}
}

func (c *deleteTestSetup) expectPreCAPI(err error) {
Expand Down
3 changes: 0 additions & 3 deletions pkg/workflows/workload/delete_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,6 @@ func (c *deleteTestSetup) expectSaveLogsWorkload() {

func (c *deleteTestSetup) expectCleanup(err error) {
c.gitopsManager.EXPECT().CleanupGitRepo(c.ctx, c.clusterSpec).Return(err)
if err == nil {
c.writer.EXPECT().CleanUp()
}
}

func TestDeleteRunSuccess(t *testing.T) {
Expand Down
2 changes: 0 additions & 2 deletions pkg/workflows/workload/post_delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ type (
)

func (s *postDeleteWorkload) Run(ctx context.Context, commandContext *task.CommandContext) task.Task {
commandContext.Writer.CleanUp()

if commandContext.OriginalError != nil {
collector := &workflows.CollectMgmtClusterDiagnosticsTask{}
collector.Run(ctx, commandContext)
Expand Down

0 comments on commit 6f877a7

Please sign in to comment.