Skip to content

Commit

Permalink
add enable test
Browse files Browse the repository at this point in the history
  • Loading branch information
mapl committed Oct 19, 2024
1 parent e6c14f8 commit 8494112
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions resolver/sudn_resolver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,24 @@ var _ = Describe("SudnResolver", Label("sudnResolver"), func() {
return Entry(description, args...)
}

It("should be true by default", func() {
Expect(sutConfig.IsEnabled()).Should(BeTrue())
})

When("enabled", func() {
It("should be true", func() {
sutConfig.Enable = true
Expect(sutConfig.IsEnabled()).Should(BeTrue())
})
})

When("disabled", func() {
It("should be false", func() {
sutConfig.Enable = false
Expect(sutConfig.IsEnabled()).Should(BeFalse())
})
})

DescribeTable("handled domains",
func(qType dns.Type, qName string, expectedRCode int, extraMatchers ...types.GomegaMatcher) {
resp, err := sut.Resolve(ctx, newRequest(qName, qType))
Expand Down

0 comments on commit 8494112

Please sign in to comment.