Skip to content

Commit 7287073

Browse files
committed
DNS integration test: Gateway 10.0.0.1 works as DNS server on Jenkins so presumed error case is removed (not the case locally)
1 parent b38451d commit 7287073

2 files changed

Lines changed: 1 addition & 18 deletions

File tree

test/net/integration/dns/service.cpp

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,9 @@ void Service::start(const std::string&)
5353
const std::string google = "google.com";
5454
const std::string github = "github.com";
5555
const std::string guardian = "theguardian.com";
56-
const std::string hotmail = "hotmail.com";
5756
const std::string some_address = "some_address_that_doesnt_exist.com";
5857

5958
const IP4::addr stack_dns = inet.dns_addr();
60-
const IP4::addr gateway = inet.gateway();
6159
const IP4::addr level3 = IP4::addr{4, 2, 2, 1};
6260

6361
inet.resolve(google, [google, stack_dns] (IP4::addr res, Error& err) {
@@ -96,18 +94,6 @@ void Service::start(const std::string&)
9694
}
9795
});
9896

99-
inet.resolve(hotmail, gateway, [hotmail, gateway] (IP4::addr res, Error& err) {
100-
if (err) {
101-
print_error(hotmail, gateway, err);
102-
}
103-
else {
104-
if (res != IP4::ADDR_ANY)
105-
print_success(hotmail, gateway, res);
106-
else
107-
print_not_resolved(hotmail);
108-
}
109-
});
110-
11197
inet.resolve(some_address, [some_address, stack_dns] (IP4::addr res, Error& err) {
11298
if (err) {
11399
print_error(some_address, stack_dns, err);

test/net/integration/dns/test.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,13 @@ def count(trigger_line):
2323
global counter
2424
counter += 1
2525

26-
if counter == 7:
26+
if counter == 4:
2727
finish()
2828

2929
def finish():
3030
vm.exit(0, "DNS resolution test succeeded")
3131

3232
# Add custom event-handler
33-
vm.on_output("Error occurred when resolving IP address of hotmail.com with DNS server 10.0.0.1: ICMP error message received", count)
34-
vm.on_output("ICMP error type received when resolving hotmail.com: DESTINATION UNREACHABLE \\(3\\)", count)
35-
vm.on_output("ICMP error code received when resolving hotmail.com: PORT \\(3\\)", count)
3633
vm.on_output("Resolved IP address of google.com with DNS server 8.8.8.8", count)
3734
vm.on_output("Resolved IP address of theguardian.com with DNS server 4.2.2.1", count)
3835
vm.on_output("Resolved IP address of github.com with DNS server 8.8.8.8", count)

0 commit comments

Comments
 (0)