mirror of
https://github.com/hanzoai/deploy.git
synced 2026-10-07 08:44:50 +00:00
Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: crenshaw-dev <[email protected]>
33 lines
652 B
Go
33 lines
652 B
Go
package shared
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
|
|
"github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1"
|
|
"github.com/argoproj/argo-cd/v3/reposerver/apiclient"
|
|
)
|
|
|
|
func TestGetParameterValueByName(t *testing.T) {
|
|
helmAppSpec := CustomHelmAppSpec{
|
|
HelmAppSpec: apiclient.HelmAppSpec{
|
|
Parameters: []*v1alpha1.HelmParameter{
|
|
{
|
|
Name: "param1",
|
|
Value: "value1",
|
|
},
|
|
},
|
|
},
|
|
HelmParameterOverrides: []v1alpha1.HelmParameter{
|
|
{
|
|
Name: "param1",
|
|
Value: "value-override",
|
|
},
|
|
},
|
|
}
|
|
|
|
value := helmAppSpec.GetParameterValueByName("param1")
|
|
assert.Equal(t, "value-override", value)
|
|
}
|