Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
remove not relevant test
  • Loading branch information
defelmnq committed Nov 12, 2024
commit aceb50b340872bc2969b4f9482bd4a5730d7565d
25 changes: 0 additions & 25 deletions cli/clilog/clilog_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package clilog_test

import (
"encoding/json"
"io/fs"
"os"
"path/filepath"
"strings"
Expand Down Expand Up @@ -145,30 +144,6 @@ func TestBuilder(t *testing.T) {
assertLogsJSON(t, tempJSON, info, infoLog, warn, warnLog)
})
})

t.Run("NotFound", func(t *testing.T) {
t.Parallel()

tempFile := filepath.Join(t.TempDir(), "doesnotexist", "test.log")
cmd := &serpent.Command{
Use: "test",
Handler: func(inv *serpent.Invocation) error {
logger, closeLog, err := clilog.New(
clilog.WithFilter("foo", "baz"),
clilog.WithHuman(tempFile),
clilog.WithVerbose(),
).Build(inv)
if err != nil {
return err
}
defer closeLog()
logger.Error(inv.Context(), "you will never see this")
return nil
},
}
err := cmd.Invoke().Run()
require.ErrorIs(t, err, fs.ErrNotExist)
})
}

var (
Expand Down
Loading