Skip to content

Commit

Permalink
fix: replace nslookup with dig in integration tests
Browse files Browse the repository at this point in the history
This should be more reliable on `integration-aws-*` and others.

Signed-off-by: Dmitriy Matrenichev <dmitry.matrenichev@siderolabs.com>
  • Loading branch information
DmitriyMV committed May 29, 2024
1 parent 0359c85 commit 893e64f
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions internal/integration/api/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,12 +167,16 @@ func (suite *CommonSuite) TestDNSResolver() {
suite.Require().Equal("", stdout)
suite.Require().Contains(stderr, "'index.html' saved")

stdout, stderr, err = suite.ExecuteCommandInPod(suite.ctx, namespace, pod, "nslookup really-long-record.dev.siderolabs.io")
_, stderr, err = suite.ExecuteCommandInPod(suite.ctx, namespace, pod, "apk add --update bind-tools")
suite.Require().NoError(err)
suite.Require().Empty(stderr)

suite.Require().Contains(stdout, "really-long-record.dev.siderolabs.io")
suite.Require().NotContains(stdout, "Can't find")
suite.Require().NotContains(stdout, "No answer")
stdout, stderr, err = suite.ExecuteCommandInPod(suite.ctx, namespace, pod, "dig really-long-record.dev.siderolabs.io")
suite.Require().NoError(err)

suite.Require().Contains(stdout, "status: NOERROR")
suite.Require().Contains(stdout, "ANSWER: 34")
suite.Require().NotContains(stdout, "status: NXDOMAIN")
suite.Require().Equal(stderr, "")
}

Expand Down

0 comments on commit 893e64f

Please sign in to comment.