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 c2f72ecd0c.
This commit is contained in:
Evans Mungai
2024-05-01 14:38:46 +01:00
committed by GitHub
parent 6b368f2221
commit aeaac7a70f
2 changed files with 3 additions and 5 deletions

View File

@@ -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
}

View File

@@ -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) {