diff --git a/Jenkinsfile b/Jenkinsfile index acac81a6f460186252c48fd4e07c4a5bcb373983..f36238f7ddef962f61055da167e15b89b323cc54 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -82,6 +82,17 @@ tools { go 'go-1.22.0' } } } } + stage('Test antragraum-proxy') { + steps { + script { + FAILED_STAGE=env.STAGE_NAME + + sh ''' + go test ./internal/* + ''' + } + } + } stage('Build and publish Docker image') { steps { diff --git a/internal/config/config.go b/internal/config/config.go index ad387b09c3528f01657cac7ca0ffdac70ff9a450..49ecde635eff2a6dc4358c0f3235c5d84ba8b2c4 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -59,7 +59,7 @@ type Config struct { } `yaml:"logging"` } -func LoadConfig() Config { +func LoadConfig(configFilePath ...string) Config { var config Config env := os.Getenv("APP_ENV") @@ -69,7 +69,9 @@ func LoadConfig() Config { fp := fmt.Sprintf("config/config-%s.yml", env) - if testing.Testing() { + if len(configFilePath) > 0 { + fp = configFilePath[0] + } else if testing.Testing() { fp = testFilePath }