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

Function TestValidateLogFileOutput

base/logging_config_test.go:23–32  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

21)
22
23func TestValidateLogFileOutput(t *testing.T) {
24 logFileOutput := ""
25 err := validateLogFileOutput(logFileOutput)
26 assert.Error(t, err, "empty log file output")
27 assert.Equal(t, "empty log file output", err.Error())
28
29 logFileOutput = filepath.Join(os.TempDir(), "sglogfile.log")
30 err = validateLogFileOutput(logFileOutput)
31 assert.NoError(t, err, "log file output path should be validated")
32}
33
34func TestValidateLogFileOutputNonDirectory(t *testing.T) {
35 tmpdir := t.TempDir()

Callers

nothing calls this directly

Calls 3

validateLogFileOutputFunction · 0.85
ErrorMethod · 0.45
EqualMethod · 0.45

Tested by

no test coverage detected