Skip to content

Commit aeaac7a

Browse files
authored
Revert "feat: URI is not replacing the spec but merging instead (#1537) (#1539)
Revert "feat: [sc-103119] URI is not replacing the spec but merging instead (#1537)" This reverts commit c2f72ec.
1 parent 6b368f2 commit aeaac7a

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

cmd/troubleshoot/cli/run.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -273,8 +273,7 @@ func loadSupportBundleSpecsFromURIs(ctx context.Context, kinds *loader.Troublesh
273273
return err
274274
}
275275

276-
// uri spec replaces the original spec
277-
*kinds = *moreKinds
276+
kinds.Add(moreKinds)
278277
return nil
279278
}
280279

cmd/troubleshoot/cli/run_test.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,8 @@ spec:
5757
err = loadSupportBundleSpecsFromURIs(ctx, kinds)
5858
require.NoError(t, err)
5959

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

6564
func Test_loadSupportBundleSpecsFromURIs_TimeoutError(t *testing.T) {

0 commit comments

Comments
 (0)