update: github.com/onsi/gomega

This commit is contained in:
Dimitri Herzog 2022-09-03 23:43:26 +02:00
parent 3c334c13b4
commit 48dbc5bc13
4 changed files with 9 additions and 9 deletions

View File

@ -120,8 +120,8 @@ var _ = Describe("Expiration cache", func() {
val, ttl := cache.Get("key1")
Expect(val).Should(Equal("val2"))
Expect(ttl.Milliseconds()).Should(And(
BeNumerically(">", 900)),
BeNumerically("<=", 1000))
BeNumerically(">", 900),
BeNumerically("<=", 1000)))
})
It("should delete the key if function returns nil", func() {

2
go.mod
View File

@ -21,7 +21,7 @@ require (
github.com/miekg/dns v1.1.50
github.com/mroth/weightedrand v0.4.1
github.com/onsi/ginkgo/v2 v2.1.6
github.com/onsi/gomega v1.20.1
github.com/onsi/gomega v1.20.2
github.com/prometheus/client_golang v1.13.0
github.com/sirupsen/logrus v1.9.0
github.com/spf13/cobra v1.5.0

4
go.sum
View File

@ -548,8 +548,8 @@ github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6
github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE=
github.com/onsi/ginkgo/v2 v2.1.6 h1:Fx2POJZfKRQcM1pH49qSZiYeu319wji004qX+GDovrU=
github.com/onsi/ginkgo/v2 v2.1.6/go.mod h1:MEH45j8TBi6u9BMogfbp0stKC5cdGjumZj5Y7AG4VIk=
github.com/onsi/gomega v1.20.1 h1:PA/3qinGoukvymdIDV8pii6tiZgC8kbmJO6Z5+b002Q=
github.com/onsi/gomega v1.20.1/go.mod h1:DtrZpjmvpn2mPm4YWQa0/ALMDj9v4YxLgojwPeREyVo=
github.com/onsi/gomega v1.20.2 h1:8uQq0zMgLEfa0vRrrBgaJF2gyW9Da9BmfGV+OyUzfkY=
github.com/onsi/gomega v1.20.2/go.mod h1:iYAIXgPSaDHak0LCMA+AWBpIKBr8WZicMxnE8luStNc=
github.com/otiai10/copy v1.2.0 h1:HvG945u96iNadPoG2/Ja2+AUJeW5YuFQMixq9yirC+k=
github.com/otiai10/copy v1.2.0/go.mod h1:rrF5dJ5F0t/EWSYODDu4j9/vEeYHMkc8jt0zJChqQWw=
github.com/otiai10/curr v0.0.0-20150429015615-9b4961190c95/go.mod h1:9qAhocn7zKJG+0mI8eUu6xqkFDYS2kb2saOteoSB3cE=

View File

@ -129,8 +129,8 @@ var _ = Describe("CustomDNSResolver", func() {
Expect(resp.Res.Rcode).Should(Equal(dns.RcodeSuccess))
Expect(resp.Res.Answer).Should(HaveLen(2))
Expect(resp.Res.Answer).Should(ContainElements(
BeDNSRecord("multiple.ips.", dns.TypeA, TTL, "192.168.143.123")),
BeDNSRecord("multiple.ips.", dns.TypeA, TTL, "192.168.143.125"))
BeDNSRecord("multiple.ips.", dns.TypeA, TTL, "192.168.143.123"),
BeDNSRecord("multiple.ips.", dns.TypeA, TTL, "192.168.143.125")))
// will not delegate to next resolver
m.AssertNotCalled(GinkgoT(), "Resolve", mock.Anything)
})
@ -157,9 +157,9 @@ var _ = Describe("CustomDNSResolver", func() {
Expect(resp.Res.Answer).Should(HaveLen(2))
Expect(resp.Res.Answer).Should(ContainElements(
BeDNSRecord("4.3.3.7.0.7.3.0.e.2.a.8.0.0.0.0.0.0.0.0.3.a.5.8.8.b.d.0.1.0.0.2.ip6.arpa.",
dns.TypePTR, TTL, "ip6.domain.")),
dns.TypePTR, TTL, "ip6.domain."),
BeDNSRecord("4.3.3.7.0.7.3.0.e.2.a.8.0.0.0.0.0.0.0.0.3.a.5.8.8.b.d.0.1.0.0.2.ip6.arpa.",
dns.TypePTR, TTL, "multiple.ips."))
dns.TypePTR, TTL, "multiple.ips.")))
// will not delegate to next resolver
m.AssertNotCalled(GinkgoT(), "Resolve", mock.Anything)
})