diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-05-04 09:09:50 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-05-04 09:09:50 +0300 |
commit | b6a194f6625042a09e083443c3326cc61aefc4c0 (patch) | |
tree | a7d03dda82b309254ab0333ead7b449fd7d1efa9 /workhorse/internal/upstream | |
parent | 44ca34ad66b8b7f54c0c8a8f549aafb7293c8a38 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'workhorse/internal/upstream')
-rw-r--r-- | workhorse/internal/upstream/routes.go | 2 | ||||
-rw-r--r-- | workhorse/internal/upstream/routes_test.go | 11 |
2 files changed, 13 insertions, 0 deletions
diff --git a/workhorse/internal/upstream/routes.go b/workhorse/internal/upstream/routes.go index 8f9d056b8f3..c5af9dc3f00 100644 --- a/workhorse/internal/upstream/routes.go +++ b/workhorse/internal/upstream/routes.go @@ -406,6 +406,8 @@ func configureRoutes(u *upstream) { u.route("", "^/api/v4/geo_replication", defaultUpstream), u.route("", "^/api/v4/geo/proxy_git_ssh", defaultUpstream), u.route("", "^/api/v4/geo/graphql", defaultUpstream), + u.route("", "^/api/v4/geo_nodes/current/failures", defaultUpstream), + u.route("", "^/api/v4/geo_sites/current/failures", defaultUpstream), // Internal API routes u.route("", "^/api/v4/internal", defaultUpstream), diff --git a/workhorse/internal/upstream/routes_test.go b/workhorse/internal/upstream/routes_test.go index 8a032519bdf..13c000bf791 100644 --- a/workhorse/internal/upstream/routes_test.go +++ b/workhorse/internal/upstream/routes_test.go @@ -22,6 +22,17 @@ func TestAdminGeoPathsWithGeoProxy(t *testing.T) { runTestCasesWithGeoProxyEnabled(t, testCases) } +func TestApiGeoPathsWithGeoProxy(t *testing.T) { + testCases := []testCase{ + {"Geo replication endpoint", "/api/v4/geo_replication", "Local Rails server received request to path /api/v4/geo_replication"}, + {"Geo GraphQL endpoint", "/api/v4/geo/graphql", "Local Rails server received request to path /api/v4/geo/graphql"}, + {"Current geo node failures", "/api/v4/geo_nodes/current/failures", "Local Rails server received request to path /api/v4/geo_nodes/current/failures"}, + {"Current geo sites failures", "/api/v4/geo_sites/current/failures", "Local Rails server received request to path /api/v4/geo_sites/current/failures"}, + } + + runTestCasesWithGeoProxyEnabled(t, testCases) +} + func TestProjectNotExistingGitHttpPullWithGeoProxy(t *testing.T) { testCases := []testCase{ {"secondary info/refs", "/group/project.git/info/refs", "Local Rails server received request to path /group/project.git/info/refs"}, |