v0.35.0 tui fixes
Package / arch (push) Canceled after 0s
Package / user (push) Canceled after 0s
Package / deb (push) Canceled after 0s
Package / freebsd (push) Canceled after 0s
Package / image (push) Canceled after 0s
Test / test (push) Canceled after 0s
Test / e2e (push) Canceled after 0s
Package / arch (push) Canceled after 0s
Package / user (push) Canceled after 0s
Package / deb (push) Canceled after 0s
Package / freebsd (push) Canceled after 0s
Package / image (push) Canceled after 0s
Test / test (push) Canceled after 0s
Test / e2e (push) Canceled after 0s
This commit is contained in:
1 parent
1abffcec6c
commit
f4f8cc0986
24 files changed
+965
-295
No files matched your search
@@ -18,6 +18,8 @@ import (
|
||||
"github.com/lixenwraith/logwisp/internal/plugin"
|
||||
"github.com/lixenwraith/logwisp/internal/testutil"
|
||||
"github.com/lixenwraith/logwisp/internal/tlsx"
|
||||
|
||||
"github.com/lixenwraith/log"
|
||||
)
|
||||
|
||||
// lw's own flags: a short is its long flag, an unknown single-dash one fails,
|
||||
@@ -191,6 +193,21 @@ func TestDumpReadsBack(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
// lw's own log file goes under the home directory for a leading ~, which the
|
||||
// configuration keeps as typed
|
||||
func TestTheLogDirectoryReadsTildeAsHome(t *testing.T) {
|
||||
home := t.TempDir()
|
||||
t.Setenv("HOME", home)
|
||||
empty := filepath.Join(home, "empty.toml")
|
||||
if err := os.WriteFile(empty, nil, 0o600); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
logCfg := log.DefaultConfig()
|
||||
if configureFileLogging(logCfg, loadTestConfig(t, empty, "--logging.file.directory=~/lw")); logCfg.Directory != home+"/lw" {
|
||||
t.Fatalf("log directory %q", logCfg.Directory)
|
||||
}
|
||||
}
|
||||
|
||||
// The command line, file and environment a composition writes, read by a
|
||||
// POSIX shell and loaded as lw loads them, give its pipelines back: every
|
||||
// preset, a second sink, a file's stage without its defaults, an integer for
|
||||
|
||||
Reference in new issue
Block a user