diff options
author | Jaime Martinez <jmartinez@gitlab.com> | 2020-12-10 09:38:29 +0300 |
---|---|---|
committer | Jaime Martinez <jmartinez@gitlab.com> | 2021-01-20 04:23:45 +0300 |
commit | ce03560d89e7315e24e6ade1fcb5ec14f0c82e39 (patch) | |
tree | 122ac1384d18dd43124bcb334c409cfd1b50d461 /app.go | |
parent | 0501f0ad4c1f99de77d0547379c9c30c75cb007c (diff) |
Add more test cases for resolver errors
Fix imports and enable test
Diffstat (limited to 'app.go')
-rw-r--r-- | app.go | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -33,6 +33,7 @@ import ( "gitlab.com/gitlab-org/gitlab-pages/internal/request" "gitlab.com/gitlab-org/gitlab-pages/internal/serving/disk/zip" "gitlab.com/gitlab-org/gitlab-pages/internal/source" + "gitlab.com/gitlab-org/gitlab-pages/internal/source/gitlab/client" "gitlab.com/gitlab-org/gitlab-pages/internal/tlsconfig" "gitlab.com/gitlab-org/gitlab-pages/metrics" ) @@ -152,7 +153,7 @@ func (a *theApp) routingMiddleware(handler http.Handler) http.Handler { // if we could not retrieve a domain from domains source we break the // middleware chain and simply respond with 502 after logging this host, d, err := a.getHostAndDomain(r) - if err != nil && !errors.Is(err, domain.ErrDomainDoesNotExist) { + if err != nil && !errors.Is(err, client.ErrDomainDoesNotExist) { metrics.DomainsSourceFailures.Inc() log.WithError(err).Error("could not fetch domain information from a source") |