Skip to content
This repository has been archived by the owner on May 25, 2022. It is now read-only.

Commit

Permalink
skip more move test
Browse files Browse the repository at this point in the history
  • Loading branch information
rockb1017 committed Jun 14, 2021
1 parent d3fd6a1 commit 06a71c3
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions operator/builtin/input/file/rotation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,10 @@ import (
"github.com/open-telemetry/opentelemetry-log-collection/testutil"
)

const WINDOWS_OS = "windows"

func TestMultiFileRotate(t *testing.T) {
if runtime.GOOS == "windows" {
if runtime.GOOS == WINDOWS_OS {
// Windows has very poor support for moving active files, so rotation is less commonly used
// This may possibly be handled better in Go 1.16: https://github.com/golang/go/issues/35358
t.Skip()
Expand Down Expand Up @@ -87,7 +89,7 @@ func TestMultiFileRotate(t *testing.T) {
}

func TestMultiFileRotateSlow(t *testing.T) {
if runtime.GOOS == "windows" {
if runtime.GOOS == WINDOWS_OS {
// Windows has very poor support for moving active files, so rotation is less commonly used
// This may possibly be handled better in Go 1.16: https://github.com/golang/go/issues/35358
t.Skip()
Expand Down Expand Up @@ -327,15 +329,19 @@ func TestRotation(t *testing.T) {
}

for _, tc := range cases {
if runtime.GOOS != WINDOWS_OS {
// Windows has very poor support for moving active files, so rotation is less commonly used
// This may possibly be handled better in Go 1.16: https://github.com/golang/go/issues/35358
t.Run(fmt.Sprintf("%s/CopyTruncateTimestamped", tc.name), tc.run(tc, true, false))
t.Run(fmt.Sprintf("%s/CopyTruncateSequential", tc.name), tc.run(tc, true, true))
}
t.Run(fmt.Sprintf("%s/MoveCreateTimestamped", tc.name), tc.run(tc, false, false))
t.Run(fmt.Sprintf("%s/MoveCreateSequential", tc.name), tc.run(tc, false, true))
t.Run(fmt.Sprintf("%s/CopyTruncateTimestamped", tc.name), tc.run(tc, true, false))
t.Run(fmt.Sprintf("%s/CopyTruncateSequential", tc.name), tc.run(tc, true, true))
}
}

func TestMoveFile(t *testing.T) {
if runtime.GOOS == "windows" {
if runtime.GOOS == WINDOWS_OS {
t.Skip("Moving files while open is unsupported on Windows")
}
t.Parallel()
Expand All @@ -361,7 +367,7 @@ func TestMoveFile(t *testing.T) {
}

func TestTrackMovedAwayFiles(t *testing.T) {
if runtime.GOOS == "windows" {
if runtime.GOOS == WINDOWS_OS {
t.Skip("Moving files while open is unsupported on Windows")
}
t.Parallel()
Expand Down

0 comments on commit 06a71c3

Please sign in to comment.