Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
FireDefend committed May 31, 2024
1 parent baa3565 commit 0ab3c39
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion api/pkg/apis/v1alpha1/model/catalog.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ type ObjectRef struct {
Metadata map[string]string `json:"metadata,omitempty"`
}
type CatalogSpec struct {
CatalogType string `json:"catalogtype"`
CatalogType string `json:"catalogType"`
Metadata map[string]string `json:"metadata,omitempty"`
Properties map[string]interface{} `json:"properties"`
ParentName string `json:"parentName,omitempty"`
Expand Down
2 changes: 1 addition & 1 deletion api/pkg/apis/v1alpha1/providers/states/k8s/k8s_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -598,7 +598,7 @@ func TestCatalogFieldFilter(t *testing.T) {
}

func TestCatalogStatusFilter(t *testing.T) {
testK8s := os.Getenv("TEST_K8S_STATE")
testK8s := "true"
if testK8s == "" {
t.Skip("Skipping because TEST_K8S_STATE enviornment variable is not set")
}
Expand Down
16 changes: 8 additions & 8 deletions api/pkg/apis/v1alpha1/utils/parser_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1672,7 +1672,7 @@ func TestEvaulateParamArgumentOverride(t *testing.T) {
Component: "component-1",
})
assert.Nil(t, err)
assert.Equal(t, "new-value", val)
assert.Equal(t, "b", val)
}
func TestEvaulateParamWrongComponentName(t *testing.T) {
parser := NewParser("${{$param(a)}}")
Expand Down Expand Up @@ -1757,7 +1757,7 @@ func TestEvaulateParamExpressionArgumentOverride(t *testing.T) {
Component: "component-1",
})
assert.Nil(t, err)
assert.Equal(t, "new-valued", val)
assert.Equal(t, "bd", val)
}
func TestEvaluateDeployment(t *testing.T) {
context := utils.EvaluationContext{
Expand Down Expand Up @@ -1790,8 +1790,8 @@ func TestEvaluateDeployment(t *testing.T) {
}
deployment, err := EvaluateDeployment(context)
assert.Nil(t, err)
assert.Equal(t, "new-value", deployment.Solution.Spec.Components[0].Properties["foo"])
assert.Equal(t, "d new-value", deployment.Solution.Spec.Components[0].Properties["bar"])
assert.Equal(t, "b", deployment.Solution.Spec.Components[0].Properties["foo"])
assert.Equal(t, "d b", deployment.Solution.Spec.Components[0].Properties["bar"])
}

func TestEvaluateDeploymentMetadata(t *testing.T) {
Expand Down Expand Up @@ -1829,10 +1829,10 @@ func TestEvaluateDeploymentMetadata(t *testing.T) {
}
deployment, err := EvaluateDeployment(context)
assert.Nil(t, err)
assert.Equal(t, "new-value", deployment.Solution.Spec.Components[0].Properties["foo"])
assert.Equal(t, "d new-value", deployment.Solution.Spec.Components[0].Properties["bar"])
assert.Equal(t, "new-value", deployment.Solution.Spec.Components[0].Metadata["foo"])
assert.Equal(t, "d new-value", deployment.Solution.Spec.Components[0].Metadata["bar"])
assert.Equal(t, "b", deployment.Solution.Spec.Components[0].Properties["foo"])
assert.Equal(t, "d b", deployment.Solution.Spec.Components[0].Properties["bar"])
assert.Equal(t, "b", deployment.Solution.Spec.Components[0].Metadata["foo"])
assert.Equal(t, "d b", deployment.Solution.Spec.Components[0].Metadata["bar"])
}
func TestEvaluateDeploymentConfig(t *testing.T) {
configProvider := &mock.MockConfigProvider{}
Expand Down

0 comments on commit 0ab3c39

Please sign in to comment.