mirror of https://github.com/0xERR0R/blocky.git
fix caching resolver test
This commit is contained in:
parent
05446fa9ed
commit
c7986899b8
|
@ -782,13 +782,13 @@ var _ = Describe("CachingResolver", func() {
|
|||
request := newRequest("example2.com.", A)
|
||||
domain := util.ExtractDomain(request.Req.Question[0])
|
||||
cacheKey := util.GenerateCacheKey(A, domain)
|
||||
redisMockMsg := &redis.CacheMessage{
|
||||
Key: cacheKey,
|
||||
Response: &Response{
|
||||
RType: ResponseTypeCACHED,
|
||||
Reason: "MOCK_REDIS",
|
||||
Res: mockAnswer,
|
||||
},
|
||||
binMsg, err := mockAnswer.Pack()
|
||||
Expect(err).Should(Succeed())
|
||||
|
||||
redisMockMsg := &redis.CacheEntry{
|
||||
TTL: 123,
|
||||
Key: cacheKey,
|
||||
Entry: binMsg,
|
||||
}
|
||||
redisClient.CacheChannel <- redisMockMsg
|
||||
|
||||
|
|
Loading…
Reference in New Issue