Skip to content

Commit

Permalink
fix test cases
Browse files Browse the repository at this point in the history
Signed-off-by: Horiodino <[email protected]>
  • Loading branch information
Horiodino committed Aug 19, 2024
1 parent c4afc9a commit c076add
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions pkg/devfile/generator/generators_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1478,8 +1478,8 @@ func TestGetPodTemplateSpec(t *testing.T) {
Name: "main",
Image: "an-image",
Env: []corev1.EnvVar{
{Name: "PROJECTS_ROOT", Value: "/projects"},
{Name: "PROJECT_SOURCE", Value: "/projects"},
{Name: "PROJECTS_ROOT", Value: "/projects"},
},
ImagePullPolicy: corev1.PullAlways,
SecurityContext: &corev1.SecurityContext{
Expand All @@ -1490,8 +1490,8 @@ func TestGetPodTemplateSpec(t *testing.T) {
Name: "tools",
Image: "a-tool-image",
Env: []corev1.EnvVar{
{Name: "PROJECTS_ROOT", Value: "/projects"},
{Name: "PROJECT_SOURCE", Value: "/projects"},
{Name: "PROJECTS_ROOT", Value: "/projects"},
},
ImagePullPolicy: corev1.PullAlways,
Ports: []corev1.ContainerPort{},
Expand Down Expand Up @@ -1542,8 +1542,8 @@ func TestGetPodTemplateSpec(t *testing.T) {
Name: "main",
Image: "an-image",
Env: []corev1.EnvVar{
{Name: "PROJECTS_ROOT", Value: "/projects"},
{Name: "PROJECT_SOURCE", Value: "/projects"},
{Name: "PROJECTS_ROOT", Value: "/projects"},
},
ImagePullPolicy: corev1.PullAlways,
SecurityContext: &corev1.SecurityContext{
Expand Down Expand Up @@ -1596,8 +1596,8 @@ func TestGetPodTemplateSpec(t *testing.T) {
Name: "main",
Image: "an-image",
Env: []corev1.EnvVar{
{Name: "PROJECTS_ROOT", Value: "/projects"},
{Name: "PROJECT_SOURCE", Value: "/projects"},
{Name: "PROJECTS_ROOT", Value: "/projects"},
},
ImagePullPolicy: corev1.PullAlways,
SecurityContext: &corev1.SecurityContext{
Expand Down Expand Up @@ -1652,8 +1652,8 @@ func TestGetPodTemplateSpec(t *testing.T) {
Name: "main",
Image: "an-image",
Env: []corev1.EnvVar{
{Name: "PROJECTS_ROOT", Value: "/projects"},
{Name: "PROJECT_SOURCE", Value: "/projects"},
{Name: "PROJECTS_ROOT", Value: "/projects"},
},
ImagePullPolicy: corev1.PullAlways,
Ports: []corev1.ContainerPort{},
Expand Down Expand Up @@ -1706,8 +1706,8 @@ func TestGetPodTemplateSpec(t *testing.T) {
Name: "main",
Image: "an-image",
Env: []corev1.EnvVar{
{Name: "PROJECTS_ROOT", Value: "/projects"},
{Name: "PROJECT_SOURCE", Value: "/projects"},
{Name: "PROJECTS_ROOT", Value: "/projects"},
},
ImagePullPolicy: corev1.PullAlways,
SecurityContext: &corev1.SecurityContext{
Expand Down Expand Up @@ -1744,7 +1744,6 @@ func TestGetPodTemplateSpec(t *testing.T) {
mockDevfileData.EXPECT().GetAttributes().Return(attributes.Attributes{
PodOverridesAttribute: apiext.JSON{Raw: []byte("{\"spec\": {\"securityContext\": {\"seccompProfile\": {\"type\": \"Localhost\"}}}}")},
}, nil)

mockDevfileData.EXPECT().GetSchemaVersion().Return("2.1.0").AnyTimes()
return parser.DevfileObj{
Data: mockDevfileData,
Expand Down Expand Up @@ -1772,8 +1771,8 @@ func TestGetPodTemplateSpec(t *testing.T) {
Name: "main",
Image: "an-image",
Env: []corev1.EnvVar{
{Name: "PROJECTS_ROOT", Value: "/projects"},
{Name: "PROJECT_SOURCE", Value: "/projects"},
{Name: "PROJECTS_ROOT", Value: "/projects"},
},
ImagePullPolicy: corev1.PullAlways,
Ports: []corev1.ContainerPort{},
Expand Down Expand Up @@ -1841,8 +1840,8 @@ func TestGetPodTemplateSpec(t *testing.T) {
Name: "main",
Image: "an-image",
Env: []corev1.EnvVar{
{Name: "PROJECTS_ROOT", Value: "/projects"},
{Name: "PROJECT_SOURCE", Value: "/projects"},
{Name: "PROJECTS_ROOT", Value: "/projects"},
},
ImagePullPolicy: corev1.PullAlways,
Ports: []corev1.ContainerPort{},
Expand Down Expand Up @@ -1904,8 +1903,8 @@ func TestGetPodTemplateSpec(t *testing.T) {
Name: "main",
Image: "an-image",
Env: []corev1.EnvVar{
{Name: "PROJECTS_ROOT", Value: "/projects"},
{Name: "PROJECT_SOURCE", Value: "/projects"},
{Name: "PROJECTS_ROOT", Value: "/projects"},
},
ImagePullPolicy: corev1.PullAlways,
Ports: []corev1.ContainerPort{},
Expand Down Expand Up @@ -1966,8 +1965,8 @@ func TestGetPodTemplateSpec(t *testing.T) {
Name: "tools",
Image: "a-tool-image",
Env: []corev1.EnvVar{
{Name: "PROJECTS_ROOT", Value: "/projects"},
{Name: "PROJECT_SOURCE", Value: "/projects"},
{Name: "PROJECTS_ROOT", Value: "/projects"},
},
ImagePullPolicy: corev1.PullAlways,
Ports: []corev1.ContainerPort{},
Expand Down

0 comments on commit c076add

Please sign in to comment.