Skip to content

Commit e5d3b52

Browse files
authored
Merge pull request #9 from jonathanio/feature/domain-handling
Improve DOMAIN* Handling
2 parents e356fd1 + 71678f9 commit e5d3b52

18 files changed

+122
-21
lines changed

run-tests

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,9 @@ function runtest {
132132
[[ ${busctl_called} -eq 0 ]] && \
133133
_pass "busctl was not called, as expected" || \
134134
_fail "busctl was called, not expected"
135+
else
136+
[[ ${busctl_called} -eq 0 ]] && \
137+
_fail "busctl was not called, not expected"
135138
fi
136139

137140
echo
File renamed without changes.

tests/04_multiple_ipv4_dns_2.sh renamed to tests/03b_multiple_ipv4_dns_2.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
script_type="up"
2-
dev="tun04"
2+
dev="tun03"
33
foreign_option_1="dhcp-option DNS 1.23.4.56"
44
foreign_option_2="dhcp-option DNS 5.6.7.89"
55
foreign_option_3="dhcp-option DNS 34.5.67.8"
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
script_type="up"
2-
dev="tun05"
2+
dev="tun04"
33
foreign_option_1="dhcp-option DOMAIN example.com"
44

5-
TEST_TITLE="DNS Domain Only"
5+
TEST_TITLE="Single DNS Domain"
66
TEST_BUSCTL_CALLED=1
77
TEST_BUSCTL_DOMAINS="1 example.com false"

tests/04b_multiple_dns_domains.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
script_type="up"
2+
dev="tun04"
3+
foreign_option_1="dhcp-option DOMAIN example.com"
4+
foreign_option_2="dhcp-option DOMAIN example.co"
5+
6+
TEST_TITLE="Multiple DNS Domains"
7+
TEST_BUSCTL_CALLED=1
8+
TEST_BUSCTL_DOMAINS="1 example.co false"
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
script_type="up"
2-
dev="tun06"
2+
dev="tun05"
33
foreign_option_1="dhcp-option DOMAIN example.com"
44
foreign_option_2="dhcp-option DOMAIN-SEARCH example.org"
55

6-
TEST_TITLE="DNS Domain and Search (Part 1)"
6+
TEST_TITLE="DNS Single Domain and Single Search"
77
TEST_BUSCTL_CALLED=1
8-
TEST_BUSCTL_DOMAINS="2 example.com false example.org true"
8+
TEST_BUSCTL_DOMAINS="2 example.com false example.org false"
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
script_type="up"
2-
dev="tun07"
2+
dev="tun05"
33
foreign_option_1="dhcp-option DOMAIN example.com"
44
foreign_option_2="dhcp-option DOMAIN-SEARCH example.org"
55
foreign_option_3="dhcp-option DOMAIN-SEARCH example.net"
66

7-
TEST_TITLE="DNS Domain and Search (Part 2)"
7+
TEST_TITLE="DNS Single Domain and Dual Search"
88
TEST_BUSCTL_CALLED=1
9-
TEST_BUSCTL_DOMAINS="3 example.com false example.org true example.net true"
9+
TEST_BUSCTL_DOMAINS="3 example.com false example.org false example.net false"
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
script_type="up"
2+
dev="tun05"
3+
foreign_option_1="dhcp-option DOMAIN-SEARCH example.org"
4+
foreign_option_2="dhcp-option DOMAIN example.com"
5+
foreign_option_3="dhcp-option DOMAIN-SEARCH example.net"
6+
7+
TEST_TITLE="DNS Single Domain and Dual Search (with Order Check)"
8+
TEST_BUSCTL_CALLED=1
9+
TEST_BUSCTL_DOMAINS="3 example.com false example.org false example.net false"
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
script_type="up"
2+
dev="tun05"
3+
foreign_option_1="dhcp-option DOMAIN-SEARCH example.org"
4+
foreign_option_2="dhcp-option DOMAIN example.co"
5+
foreign_option_3="dhcp-option DOMAIN example.com"
6+
foreign_option_4="dhcp-option DOMAIN-SEARCH example.net"
7+
8+
TEST_TITLE="DNS Dual Domain and Dual Search (with Order Check)"
9+
TEST_BUSCTL_CALLED=1
10+
TEST_BUSCTL_DOMAINS="3 example.com false example.org false example.net false"

tests/06a_single_domain_route.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
script_type="up"
2+
dev="tun06"
3+
foreign_option_1="dhcp-option DOMAIN-ROUTE example.com"
4+
5+
TEST_TITLE="Single DNS Route"
6+
TEST_BUSCTL_CALLED=1
7+
TEST_BUSCTL_DOMAINS="1 example.com true"

0 commit comments

Comments
 (0)