Skip to content

Commit

Permalink
[chore] Skip Supervisor log file test on Windows (#35591)
Browse files Browse the repository at this point in the history
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description

Follow up to
#35588.

This skips the test on Windows. The logic should be similar on other
operating systems, so it's not a significant loss to skip it. The issue
arises because Zap does not close log files itself and provides no
handles to close them, so we would need to find a clever way to close
the file or would need to simply not clean it up after the test
executes.
  • Loading branch information
evan-bradley authored Oct 3, 2024
1 parent 938182f commit 5d9fcbb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cmd/opampsupervisor/e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1363,6 +1363,10 @@ type LogEntry struct {
}

func TestSupervisorInfoLoggingLevel(t *testing.T) {
if runtime.GOOS == "windows" {
t.Skip("Zap does not close the log file and Windows disallows removing files that are still opened.")
}

storageDir := t.TempDir()
remoteCfgFilePath := filepath.Join(storageDir, "last_recv_remote_config.dat")

Expand Down

0 comments on commit 5d9fcbb

Please sign in to comment.