Skip to content

Commit

Permalink
Address PR comments
Browse files Browse the repository at this point in the history
Signed-off-by: Corbin Phelps <corbin.phelps@bluemedora.com>
  • Loading branch information
Corbin Phelps committed Feb 18, 2022
1 parent 64e6818 commit 23d7ae8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
15 changes: 6 additions & 9 deletions operator/builtin/input/file/rotation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,10 @@ import (
"github.com/stretchr/testify/require"
)

//revive:disable:var-naming
const WINDOWS_OS = "windows"

//revive:enable:var-naming
const windowsOS = "windows"

func TestMultiFileRotate(t *testing.T) {
if runtime.GOOS == WINDOWS_OS {
if runtime.GOOS == windowsOS {
// 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 @@ -78,7 +75,7 @@ func TestMultiFileRotate(t *testing.T) {
}

func TestMultiFileRotateSlow(t *testing.T) {
if runtime.GOOS == WINDOWS_OS {
if runtime.GOOS == windowsOS {
// 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 @@ -351,7 +348,7 @@ func TestRotation(t *testing.T) {
}

for _, tc := range cases {
if runtime.GOOS != WINDOWS_OS {
if runtime.GOOS != windowsOS {
// 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/MoveCreateTimestamped", tc.name), tc.run(tc, false, false))
Expand All @@ -363,7 +360,7 @@ func TestRotation(t *testing.T) {
}

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

func TestTrackMovedAwayFiles(t *testing.T) {
if runtime.GOOS == WINDOWS_OS {
if runtime.GOOS == windowsOS {
t.Skip("Moving files while open is unsupported on Windows")
}
t.Parallel()
Expand Down
4 changes: 2 additions & 2 deletions revive/config.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
ignoreGeneratedHeader = false
severity = "warning"
confidence = 0.8
errorCode = 0
warningCode = 0
errorCode = 1
warningCode = 1

[rule.blank-imports]
[rule.context-as-argument]
Expand Down

0 comments on commit 23d7ae8

Please sign in to comment.