github.com/smartcontractkit/chainlink-testing-framework/libs@v0.0.0-20240227141906-ec710b4eb1a3/config/wasp_autobuild.go (about) 1 package config 2 3 import ( 4 "errors" 5 ) 6 7 type WaspAutoBuildConfig struct { 8 Namespace *string `toml:"namespace"` 9 RepoImageVersionURI *string `toml:"repo_image_version_uri"` 10 TestBinaryName *string `toml:"test_binary_name"` 11 TestName *string `toml:"test_name"` 12 TestTimeout *string `toml:"test_timeout"` 13 KeepJobs bool `toml:"keep_jobs"` 14 WaspLogLevel *string `toml:"wasp_log_level"` 15 WaspJobs *string `toml:"wasp_jobs"` 16 UpdateImage bool `toml:"update_image"` 17 } 18 19 func (c *WaspAutoBuildConfig) Validate() error { 20 if c.Namespace == nil || *c.Namespace == "" { 21 return errors.New("WASP namespace name should not be empty, see WASP docs to setup it") 22 } 23 if c.RepoImageVersionURI == nil || *c.RepoImageVersionURI == "" { 24 return errors.New("WASP image URI is empty, must be ${registry}/${repo}:${tag}") 25 } 26 if c.TestBinaryName == nil || *c.TestBinaryName == "" { 27 return errors.New("WASP test binary is empty, should be 'ocr.test', run 'go test -c ./...' in load test dir to figure out the name") 28 } 29 if c.TestName == nil || *c.TestName == "" { 30 return errors.New("WASP test name is empty, should be a name of go test you want to run") 31 } 32 if c.TestTimeout == nil || *c.TestTimeout == "" { 33 return errors.New("WASP test timeout should be in Go time format: '1w2d3h4m5s'") 34 } 35 if c.WaspJobs == nil || *c.WaspJobs == "" { 36 return errors.New("WASP jobs are empty, amount of pods to spin up in k8s") 37 } 38 return nil 39 }