diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/acceptance/acceptance_test.go | 4 | ||||
-rw-r--r-- | test/acceptance/helpers_test.go | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/test/acceptance/acceptance_test.go b/test/acceptance/acceptance_test.go index 9d0c0cd2..b36bd63d 100644 --- a/test/acceptance/acceptance_test.go +++ b/test/acceptance/acceptance_test.go @@ -1,8 +1,10 @@ package acceptance_test import ( + "errors" "flag" "fmt" + "io/fs" "log" "os" "testing" @@ -58,7 +60,7 @@ func TestMain(m *testing.M) { os.Exit(0) } - if _, err := os.Stat(*pagesBinary); os.IsNotExist(err) { + if _, err := os.Stat(*pagesBinary); errors.Is(err, fs.ErrNotExist) { log.Fatalf("Couldn't find gitlab-pages binary at %s\n", *pagesBinary) } diff --git a/test/acceptance/helpers_test.go b/test/acceptance/helpers_test.go index 33a19127..d9f2f14c 100644 --- a/test/acceptance/helpers_test.go +++ b/test/acceptance/helpers_test.go @@ -6,8 +6,10 @@ import ( "crypto/tls" "crypto/x509" "encoding/json" + "errors" "fmt" "io" + "io/fs" "net" "net/http" "net/http/httptest" @@ -554,7 +556,7 @@ func (o *stubOpts) getAPICalled() bool { func lookupFromFile(t *testing.T, domain string, w http.ResponseWriter) { fixture, err := os.Open("../../shared/lookups/" + domain + ".json") - if os.IsNotExist(err) { + if errors.Is(err, fs.ErrNotExist) { w.WriteHeader(http.StatusNoContent) t.Logf("GitLab domain %s source stub served 204", domain) |