Skip to content

Commit 3cca9d8

Browse files
committed
feat: release v0.5.1
1 parent 2cc3301 commit 3cca9d8

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v0.5.0-dev
1+
v0.5.1

internal/ocm-cli/ocm_test.go

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import (
55
"testing"
66

77
"github.com/stretchr/testify/assert"
8+
"k8s.io/apimachinery/pkg/util/json"
89
"k8s.io/utils/ptr"
910

1011
ocmcli "github.com/openmcp-project/bootstrapper/internal/ocm-cli"
@@ -114,6 +115,19 @@ func TestGetComponentVersion(t *testing.T) {
114115
MediaType: ptr.To("application/octet-stream"),
115116
},
116117
})
118+
119+
cvMarshaled, err := json.Marshal(cv)
120+
assert.NoError(t, err)
121+
assert.NotNil(t, cvMarshaled)
122+
123+
var cvAsMap map[string]interface{}
124+
err = json.Unmarshal(cvMarshaled, &cvAsMap)
125+
assert.NoError(t, err)
126+
assert.NotNil(t, cvAsMap)
127+
assert.Contains(t, cvAsMap, "component")
128+
assert.Contains(t, cvAsMap["component"], "componentReferences")
129+
comp := cvAsMap["component"].(map[string]interface{})
130+
assert.Len(t, comp["componentReferences"], 2)
117131
},
118132
},
119133
{

0 commit comments

Comments
 (0)