Skip to content

Commit

Permalink
APIGOV-22850 - test config property
Browse files Browse the repository at this point in the history
  • Loading branch information
jcollins-axway committed Jul 13, 2022
1 parent b83eb7e commit 0002a58
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions pkg/cmd/cmd_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ func TestRootCmdFlags(t *testing.T) {
assertStringSliceCmdFlag(t, rootCmd, "central.ssl.cipherSuites", "centralSslCipherSuites", corecfg.TLSDefaultCipherSuitesStringSlice(), "List of supported cipher suites, comma separated")
assertStringCmdFlag(t, rootCmd, "central.ssl.minVersion", "centralSslMinVersion", corecfg.TLSDefaultMinVersionString(), "Minimum acceptable SSL/TLS protocol version")
assertStringCmdFlag(t, rootCmd, "central.ssl.maxVersion", "centralSslMaxVersion", "0", "Maximum acceptable SSL/TLS protocol version")
assertBooleanCmdFlag(t, rootCmd, "central.migration.cleanInstances", "centralMigrationCleanInstances", false, "Set this to clean all but latest instance, per stage, within an API Service")

// Traceability Agent
rootCmd = NewRootCmd("Test", "TestRootCmd", nil, nil, corecfg.TraceabilityAgent)
Expand Down
13 changes: 13 additions & 0 deletions pkg/config/migrationconfig_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package config

import (
"testing"

"github.com/stretchr/testify/assert"
)

func TestMigrationConfig(t *testing.T) {
defConf := newMigrationConfig()

assert.False(t, defConf.ShouldCleanInstances())
}

0 comments on commit 0002a58

Please sign in to comment.