diff --git a/examples/jdbc/yaks-config.yaml b/examples/jdbc/yaks-config.yaml index ff3946ea..0958b38c 100644 --- a/examples/jdbc/yaks-config.yaml +++ b/examples/jdbc/yaks-config.yaml @@ -1,5 +1,8 @@ config: runtime: + env: + - name: CITRUS_DEFAULT_MESSAGE_TYPE + value: PLAINTEXT settings: dependencies: - groupId: org.postgresql diff --git a/pkg/cmd/config/config.go b/pkg/cmd/config/config.go index 50687510..81a6f677 100644 --- a/pkg/cmd/config/config.go +++ b/pkg/cmd/config/config.go @@ -46,6 +46,7 @@ type StepConfig struct { type RuntimeConfig struct { Cucumber CucumberConfig Settings SettingsConfig + Env []EnvConfig } type CucumberConfig struct { @@ -54,6 +55,11 @@ type CucumberConfig struct { Options string `yaml:"options"` } +type EnvConfig struct { + Name string `yaml:"name"` + Value string `yaml:"value"` +} + type SettingsConfig struct { Repositories []RepositoryConfig Dependencies []DependencyConfig diff --git a/pkg/cmd/test.go b/pkg/cmd/test.go index 0b675db3..c7e0a4b8 100644 --- a/pkg/cmd/test.go +++ b/pkg/cmd/test.go @@ -465,6 +465,10 @@ func (o *testCmdOptions) setupEnvSettings(test *v1alpha1.Test, runConfig *config env = append(env, DependenciesEnv+"="+strings.Join(o.dependencies, ",")) } + for _, envConfig := range runConfig.Config.Runtime.Env { + env = append(env, envConfig.Name+"="+envConfig.Value) + } + if o.env != nil { copy(env, o.env) }