MCPcopy Create free account
hub / github.com/couchbase/sync_gateway / TestParseCommandLineWithMissingConfig

Function TestParseCommandLineWithMissingConfig

rest/config_test.go:849–855  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

847}
848
849func TestParseCommandLineWithMissingConfig(t *testing.T) {
850 // Parse command line options with unknown sync gateway configuration file
851 args := []string{"sync_gateway", "missing-sync-gateway.conf"}
852 config, err := ParseCommandLine(base.TestCtx(t), args, flag.ContinueOnError)
853 require.Error(t, err, "Trying to read configuration file which doesn't exist")
854 assert.Nil(t, config)
855}
856
857func TestParseCommandLineWithBadConfigContent(t *testing.T) {
858 content := `{"adminInterface":"127.0.0.1:4985","interface":"0.0.0.0:4984",

Callers

nothing calls this directly

Calls 3

TestCtxFunction · 0.92
ParseCommandLineFunction · 0.85
ErrorMethod · 0.45

Tested by

no test coverage detected