Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
vstarostin committed Oct 14, 2024
1 parent 17e6778 commit 63df010
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 14 deletions.
20 changes: 10 additions & 10 deletions pkg/buildsettings/buildSettings.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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{
Expand Down
5 changes: 1 addition & 4 deletions pkg/buildsettings/buildSettings_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
//go:build unit
// +build unit

package buildsettings

import (
Expand Down Expand Up @@ -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)
}
})

Expand Down

0 comments on commit 63df010

Please sign in to comment.