diff --git a/pkg/buildsettings/buildSettings.go b/pkg/buildsettings/buildSettings.go index 2559992f59..20594eb9d1 100644 --- a/pkg/buildsettings/buildSettings.go +++ b/pkg/buildsettings/buildSettings.go @@ -9,15 +9,15 @@ import ( ) type BuildSettings struct { - GolangBuild []BuildOptions `json:"golangBuild,omitempty"` - GradleBuild []BuildOptions `json:"gradleBuild,omitempty"` - HelmExecute []BuildOptions `json:"helmExecute,omitempty"` - KanikoExecute []BuildOptions `json:"kanikoExecute,omitempty"` - MavenBuild []BuildOptions `json:"mavenBuild,omitempty"` - MtaBuild []BuildOptions `json:"mtaBuild,omitempty"` - PythonBuild []BuildOptions `json:"pythonBuild,omitempty"` - NpmExecuteScripts []BuildOptions `json:"npmExecuteScripts,omitempty"` - CnbBuild []BuildOptions `json:"cnbBuild,omitempty"` + GolangBuild []BuildOptions `json:"golangBuild,omitempty"` + GradleExecuteBuild []BuildOptions `json:"gradleExecuteBuild,omitempty"` + HelmExecute []BuildOptions `json:"helmExecute,omitempty"` + KanikoExecute []BuildOptions `json:"kanikoExecute,omitempty"` + MavenBuild []BuildOptions `json:"mavenBuild,omitempty"` + MtaBuild []BuildOptions `json:"mtaBuild,omitempty"` + PythonBuild []BuildOptions `json:"pythonBuild,omitempty"` + NpmExecuteScripts []BuildOptions `json:"npmExecuteScripts,omitempty"` + CnbBuild []BuildOptions `json:"cnbBuild,omitempty"` } type BuildOptions struct { @@ -76,7 +76,7 @@ func CreateBuildSettingsInfo(config *BuildOptions, buildTool string) (string, er }) case "gradleExecuteBuild": jsonResult, err = json.Marshal(BuildSettings{ - GradleBuild: settings, + GradleExecuteBuild: settings, }) case "helmExecute": jsonResult, err = json.Marshal(BuildSettings{ diff --git a/pkg/buildsettings/buildSettings_test.go b/pkg/buildsettings/buildSettings_test.go index f0093fd407..264d2145f2 100644 --- a/pkg/buildsettings/buildSettings_test.go +++ b/pkg/buildsettings/buildSettings_test.go @@ -1,6 +1,3 @@ -//go:build unit -// +build unit - package buildsettings import ( @@ -77,7 +74,7 @@ func TestCreateBuildSettingsInfo(t *testing.T) { for _, testCase := range testTableConfig { buildSettings, err := CreateBuildSettingsInfo(&testCase.config, testCase.buildTool) assert.Nil(t, err) - assert.Equal(t, buildSettings, testCase.expected) + assert.Equal(t, testCase.expected, buildSettings) } })