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:
Diffstat (limited to 'internal/source/gitlab/cache/cache_test.go')
-rw-r--r--internal/source/gitlab/cache/cache_test.go9
1 files changed, 3 insertions, 6 deletions
diff --git a/internal/source/gitlab/cache/cache_test.go b/internal/source/gitlab/cache/cache_test.go
index 5ae876bd..7ed56f5a 100644
--- a/internal/source/gitlab/cache/cache_test.go
+++ b/internal/source/gitlab/cache/cache_test.go
@@ -216,15 +216,12 @@ func TestResolve(t *testing.T) {
withTestCache(resolverConfig{}, nil, func(cache *Cache, resolver *client) {
cache.withTestEntry(entryConfig{expired: false, retrieved: false}, func(entry *Entry) {
ctx, cancel := context.WithCancel(context.Background())
-
- response := make(chan *api.Lookup, 1)
- go func() { response <- cache.Resolve(ctx, "my.gitlab.com") }()
-
cancel()
- resolver.domain <- "my.gitlab.com"
- lookup := <-response
+ lookup := cache.Resolve(ctx, "my.gitlab.com")
+ resolver.domain <- "err.gitlab.com"
+ require.Equal(t, "my.gitlab.com", lookup.Name)
require.EqualError(t, lookup.Error, "context done")
})
})