DEVOPS-2496 add max history setting (#12)
* add history_max setting * update docs * use suite for env test
This commit is contained in:
committed by
Colin Hoglund
parent
a566ea0cf7
commit
8d450bbf7d
9
internal/env/config_test.go
vendored
9
internal/env/config_test.go
vendored
@@ -217,6 +217,15 @@ func (suite *ConfigTestSuite) TestValuesSecretsWithDebugLogging() {
|
||||
suite.Contains(stderr.String(), `$SECRET_WATER not present in environment, replaced with ""`)
|
||||
}
|
||||
|
||||
func (suite *ConfigTestSuite) TestHistoryMax() {
|
||||
conf := NewTestConfig(suite.T())
|
||||
suite.Assert().Equal(10, conf.HistoryMax)
|
||||
|
||||
suite.setenv("PLUGIN_HISTORY_MAX", "0")
|
||||
conf = NewTestConfig(suite.T())
|
||||
suite.Assert().Equal(0, conf.HistoryMax)
|
||||
}
|
||||
|
||||
func (suite *ConfigTestSuite) setenv(key, val string) {
|
||||
orig, ok := os.LookupEnv(key)
|
||||
if ok {
|
||||
|
||||
Reference in New Issue
Block a user