Skip to content

Commit c891613

Browse files
committed
Add coverage for restricted fields
Signed-off-by: Parthvi Vala <[email protected]>
1 parent 0e8c73d commit c891613

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pkg/devfile/generator/utils_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ import (
2424
v1 "github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2"
2525
"github.com/devfile/api/v2/pkg/attributes"
2626
"github.com/golang/mock/gomock"
27-
"github.com/hashicorp/go-multierror"
2827
buildv1 "github.com/openshift/api/build/v1"
2928
"github.com/stretchr/testify/assert"
3029
corev1 "k8s.io/api/core/v1"
@@ -33,9 +32,10 @@ import (
3332
"k8s.io/apimachinery/pkg/util/intstr"
3433
"k8s.io/utils/pointer"
3534

35+
"github.com/devfile/library/v2/pkg/devfile/parser/data/v2/common"
36+
3637
"github.com/devfile/library/v2/pkg/devfile/parser"
3738
"github.com/devfile/library/v2/pkg/devfile/parser/data"
38-
"github.com/devfile/library/v2/pkg/devfile/parser/data/v2/common"
3939
"github.com/devfile/library/v2/pkg/testingutil"
4040
)
4141

@@ -1809,7 +1809,7 @@ func Test_containerOverridesHandler(t *testing.T) {
18091809
comp: v1.Component{
18101810
Name: "component2",
18111811
Attributes: attributes.Attributes{
1812-
ContainerOverridesAttribute: apiextensionsv1.JSON{Raw: []byte("{\"name\": \"othername\",\"image\": \"quay.io/other/image\", \"command\": \"echo\", \"args\": [\"hello world\"], \"ports\": [{\"containerPort\": \"9090\"}], \"env\": [{\"name\":\"somename\", \"value\":\"somevalue\"}], \"volumeMounts\": [{\"name\":\"volume1\",\"mountPath\":\"/var/www\"}]}")}},
1812+
ContainerOverridesAttribute: apiextensionsv1.JSON{Raw: []byte("{\"name\": \"othername\",\"image\": \"quay.io/other/image\", \"command\": [\"echo\"], \"args\": [\"hello world\"], \"ports\": [{\"containerPort\":9090}], \"env\": [{\"name\":\"somename\", \"value\":\"somevalue\"}], \"volumeMounts\": [{\"name\":\"volume1\",\"mountPath\":\"/var/www\"}]}")}},
18131813
},
18141814
container: getContainer(containerParams{Name: name, Image: image, Command: command, Args: argsSlice}),
18151815
},

0 commit comments

Comments
 (0)