Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-pages.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKamil TrzciƄski <ayufan@ayufan.eu>2020-10-27 06:49:07 +0300
committerVladimir Shushlin <vshushlin@gitlab.com>2020-10-27 06:49:07 +0300
commit5be346a94902c7147f3b1571e6ebb2c1f4e98eb8 (patch)
tree1e6328dd475c3578a3910181d6e2a26f20285bef /internal/vfs/local/vfs_test.go
parentb382faeec6491bb544d33549570610a476f597b7 (diff)
Properly handle processing failures with `5xx`
Prior to this change ALL processing failures unrelated to "file missing" would return `404`. This is inaccurate. Processing failures are failure of GitLab Pages and `500` should be returned in such cases.
Diffstat (limited to 'internal/vfs/local/vfs_test.go')
-rw-r--r--internal/vfs/local/vfs_test.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/internal/vfs/local/vfs_test.go b/internal/vfs/local/vfs_test.go
index ec67d595..b678cfa7 100644
--- a/internal/vfs/local/vfs_test.go
+++ b/internal/vfs/local/vfs_test.go
@@ -9,6 +9,8 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
+
+ "gitlab.com/gitlab-org/gitlab-pages/internal/vfs"
)
var localVFS = &VFS{}
@@ -98,7 +100,7 @@ func TestVFSRoot(t *testing.T) {
rootVFS, err := localVFS.Root(context.Background(), filepath.Join(tmpDir, test.path))
if test.expectedIsNotExist {
- require.Equal(t, test.expectedIsNotExist, os.IsNotExist(err))
+ require.Equal(t, test.expectedIsNotExist, vfs.IsNotExist(err))
return
}