Skip to content

Commit

Permalink
Revert "feat: URI is not replacing the spec but merging instead (#1537)…
Browse files Browse the repository at this point in the history
… (#1539)

Revert "feat: [sc-103119] URI is not replacing the spec but merging instead (#1537)"

This reverts commit c2f72ec.
  • Loading branch information
banjoh committed May 1, 2024
1 parent 6b368f2 commit aeaac7a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
3 changes: 1 addition & 2 deletions cmd/troubleshoot/cli/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -273,8 +273,7 @@ func loadSupportBundleSpecsFromURIs(ctx context.Context, kinds *loader.Troublesh
return err
}

// uri spec replaces the original spec
*kinds = *moreKinds
kinds.Add(moreKinds)
return nil
}

Expand Down
5 changes: 2 additions & 3 deletions cmd/troubleshoot/cli/run_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,8 @@ spec:
err = loadSupportBundleSpecsFromURIs(ctx, kinds)
require.NoError(t, err)

// valid uri spec will replace the original spec
require.Len(t, kinds.SupportBundlesV1Beta2, 1)
assert.NotNil(t, kinds.SupportBundlesV1Beta2[0].Spec.Collectors[0].ClusterInfo)
require.Len(t, kinds.SupportBundlesV1Beta2, 2)
assert.NotNil(t, kinds.SupportBundlesV1Beta2[1].Spec.Collectors[0].ClusterInfo)
}

func Test_loadSupportBundleSpecsFromURIs_TimeoutError(t *testing.T) {
Expand Down

0 comments on commit aeaac7a

Please sign in to comment.