VOL-3170 Remove api version argument and config file options
Change-Id: Ia293edc4af0b325c9360c271d544adb19c5c2416
diff --git a/internal/pkg/commands/command_test.go b/internal/pkg/commands/command_test.go
index 0ee0ca7..8dd449b 100644
--- a/internal/pkg/commands/command_test.go
+++ b/internal/pkg/commands/command_test.go
@@ -23,7 +23,9 @@
"testing"
)
-func TestDefaultVersion(t *testing.T) {
+// Test that ProcessGlobalOptions does not interfere with GlobalConfig
+// default.
+func TestProcessGlobalOptionsWithDefaults(t *testing.T) {
os.Setenv("VOLTCONFIG", "__DOES_NOT_EXIST__")
parser := flags.NewNamedParser(path.Base(os.Args[0]), flags.Default|flags.PassAfterNonOption)
@@ -34,7 +36,7 @@
assert.Nil(t, err, "unexpected error paring arguments")
ProcessGlobalOptions()
- assert.Equal(t, "v3", GlobalConfig.ApiVersion, "wrong default version for API version")
+ assert.Equal(t, "localhost:55555", GlobalConfig.Server, "wrong default hostname for server")
}
func TestSplitHostPort(t *testing.T) {