Skip to content
Snippets Groups Projects
Commit 294130b3 authored by OZGCloud's avatar OZGCloud
Browse files

add go test in jenkinsfile

parent 85476568
No related branches found
No related tags found
No related merge requests found
...@@ -82,6 +82,17 @@ tools { go 'go-1.22.0' } ...@@ -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') { stage('Build and publish Docker image') {
steps { steps {
......
...@@ -59,7 +59,7 @@ type Config struct { ...@@ -59,7 +59,7 @@ type Config struct {
} `yaml:"logging"` } `yaml:"logging"`
} }
func LoadConfig() Config { func LoadConfig(configFilePath ...string) Config {
var config Config var config Config
env := os.Getenv("APP_ENV") env := os.Getenv("APP_ENV")
...@@ -69,7 +69,9 @@ func LoadConfig() Config { ...@@ -69,7 +69,9 @@ func LoadConfig() Config {
fp := fmt.Sprintf("config/config-%s.yml", env) fp := fmt.Sprintf("config/config-%s.yml", env)
if testing.Testing() { if len(configFilePath) > 0 {
fp = configFilePath[0]
} else if testing.Testing() {
fp = testFilePath fp = testFilePath
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment