From 0355fc3008cc57e20c082432fcd80afcc3e5ecc4 Mon Sep 17 00:00:00 2001 From: Dawid Dziurla Date: Sat, 1 Sep 2018 17:22:23 +0200 Subject: [PATCH 1/2] don't run tests on scripts/ directory --- test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test.sh b/test.sh index a92243cf7..a1ab4301f 100755 --- a/test.sh +++ b/test.sh @@ -3,7 +3,7 @@ set -e echo "" > coverage.txt -for d in $( find ./* -maxdepth 10 ! -path "./vendor*" ! -path "./.git*" -type d); do +for d in $( find ./* -maxdepth 10 ! -path "./vendor*" ! -path "./.git*" ! -path "./scripts*" -type d); do if ls $d/*.go &> /dev/null; then go test -v -race -coverprofile=profile.out -covermode=atomic $d if [ -f profile.out ]; then From 5c1463313d5de675ccdf654a339dca33a8609534 Mon Sep 17 00:00:00 2001 From: Dawid Dziurla Date: Sat, 1 Sep 2018 17:22:49 +0200 Subject: [PATCH 2/2] respect localized output of rmdir --- pkg/commands/os_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/commands/os_test.go b/pkg/commands/os_test.go index a7ccef560..f73b78d47 100644 --- a/pkg/commands/os_test.go +++ b/pkg/commands/os_test.go @@ -29,7 +29,7 @@ func TestOSCommandRunCommandWithOutput(t *testing.T) { { "rmdir unexisting-folder", func(output string, err error) { - assert.Regexp(t, ".*No such file or directory.*", err.Error()) + assert.Regexp(t, "rmdir: .* 'unexisting-folder': .*", err.Error()) }, }, } @@ -49,7 +49,7 @@ func TestOSCommandRunCommand(t *testing.T) { { "rmdir unexisting-folder", func(err error) { - assert.Regexp(t, ".*No such file or directory.*", err.Error()) + assert.Regexp(t, "rmdir: .* 'unexisting-folder': .*", err.Error()) }, }, }