github.com/argoproj/argo-cd/v3@v3.2.1/util/notification/expression/shared/appdetail_test.go (about) 1 package shared 2 3 import ( 4 "testing" 5 6 "github.com/stretchr/testify/assert" 7 8 "github.com/argoproj/argo-cd/v3/pkg/apis/application/v1alpha1" 9 "github.com/argoproj/argo-cd/v3/reposerver/apiclient" 10 ) 11 12 func TestGetParameterValueByName(t *testing.T) { 13 helmAppSpec := CustomHelmAppSpec{ 14 HelmAppSpec: apiclient.HelmAppSpec{ 15 Parameters: []*v1alpha1.HelmParameter{ 16 { 17 Name: "param1", 18 Value: "value1", 19 }, 20 }, 21 }, 22 HelmParameterOverrides: []v1alpha1.HelmParameter{ 23 { 24 Name: "param1", 25 Value: "value-override", 26 }, 27 }, 28 } 29 30 value := helmAppSpec.GetParameterValueByName("param1") 31 assert.Equal(t, "value-override", value) 32 }