(t *testing.T)
| 21 | ) |
| 22 | |
| 23 | func 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 | |
| 34 | func TestValidateLogFileOutputNonDirectory(t *testing.T) { |
| 35 | tmpdir := t.TempDir() |
nothing calls this directly
no test coverage detected