Skip to content

Commit 164d716

Browse files
Merge pull request #145 from njhale/load-csv-name
fix(bundle): set csv name field on configmap loading
2 parents f1bac3b + 25a16c2 commit 164d716

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

pkg/configmap/configmap.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ func loadBundle(entry *logrus.Entry, data map[string]string) (bundle *api.Bundle
7878
return nil, nil, err
7979
}
8080
bundle.CsvJson = string(csvBytes)
81+
bundle.CsvName = resource.GetName()
8182
}
8283
bundle.Object = append(bundle.Object, content)
8384
logger.Infof("added to bundle, Kind=%s", resource.GetKind())

pkg/configmap/configmap_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ func TestLoad(t *testing.T) {
2525
assertFunc: func(t *testing.T, bundleGot *api.Bundle) {
2626
csvGot := bundleGot.GetCsvJson()
2727
assert.NotNil(t, csvGot)
28+
assert.Equal(t, "etcdoperator.v0.6.1", bundleGot.GetCsvName())
2829

2930
crdListGot := bundleGot.GetObject()
3031
// 1 CSV + 1 CRD = 2 objects

0 commit comments

Comments
 (0)