1
0
mirror of https://github.com/rancher/os.git synced 2025-07-31 22:47:16 +00:00

Merge pull request #873 from joshwget/dns-integration-tests

Integration tests for DNS configuration in cloud config
This commit is contained in:
Darren Shepherd 2016-04-14 21:46:39 -07:00
commit f7cd87e2fb
3 changed files with 36 additions and 2 deletions

View File

@ -21,5 +21,13 @@ rancher:
bond_opts: bond_opts:
mode: 1 mode: 1
address: 123.123.123.124/32 address: 123.123.123.124/32
dns:
override: true
search:
- mydomain.com
- example.com
nameservers:
- 208.67.222.123
- 208.67.220.123
ssh_authorized_keys: ssh_authorized_keys:
- ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC85w9stZyiLQp/DkVO6fqwiShYcj1ClKdtCqgHtf+PLpJkFReSFu8y21y+ev09gsSMRRrjF7yt0pUHV6zncQhVeqsZtgc5WbELY2DOYUGmRn/CCvPbXovoBrQjSorqlBmpuPwsStYLr92Xn+VVsMNSUIegHY22DphGbDKG85vrKB8HxUxGIDxFBds/uE8FhSy+xsoyT/jUZDK6pgq2HnGl6D81ViIlKecpOpWlW3B+fea99ADNyZNVvDzbHE5pcI3VRw8u59WmpWOUgT6qacNVACl8GqpBvQk8sw7O/X9DSZHCKafeD9G5k+GYbAUz92fKWrx/lOXfUXPS3+c8dRIF - ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC85w9stZyiLQp/DkVO6fqwiShYcj1ClKdtCqgHtf+PLpJkFReSFu8y21y+ev09gsSMRRrjF7yt0pUHV6zncQhVeqsZtgc5WbELY2DOYUGmRn/CCvPbXovoBrQjSorqlBmpuPwsStYLr92Xn+VVsMNSUIegHY22DphGbDKG85vrKB8HxUxGIDxFBds/uE8FhSy+xsoyT/jUZDK6pgq2HnGl6D81ViIlKecpOpWlW3B+fea99ADNyZNVvDzbHE5pcI3VRw8u59WmpWOUgT6qacNVACl8GqpBvQk8sw7O/X9DSZHCKafeD9G5k+GYbAUz92fKWrx/lOXfUXPS3+c8dRIF

View File

@ -21,7 +21,7 @@ def qemu(request):
return q return q
def test_network_conf(qemu): def test_network_interfaces_conf(qemu):
SSH(qemu).check_call('''cat > test-merge << "SCRIPT" SSH(qemu).check_call('''cat > test-merge << "SCRIPT"
set -x -e set -x -e
@ -37,6 +37,19 @@ sudo bash test-merge
'''.strip()) '''.strip())
def test_network_dns_conf(qemu):
SSH(qemu).check_call('''cat > test-merge << "SCRIPT"
set -x -e
cat /etc/resolv.conf | grep "search mydomain.com example.com"
cat /etc/resolv.conf | grep "nameserver 208.67.222.123"
cat /etc/resolv.conf | grep "nameserver 208.67.220.123"
SCRIPT
sudo bash test-merge
'''.strip())
def test_network_dns_ros_set(qemu): def test_network_dns_ros_set(qemu):
SSH(qemu).check_call(''' SSH(qemu).check_call('''
set -x -e set -x -e

View File

@ -21,7 +21,7 @@ def qemu(request):
return q return q
def test_network_conf(qemu): def test_network_interfaces_conf(qemu):
SSH(qemu).check_call('''cat > test-merge << "SCRIPT" SSH(qemu).check_call('''cat > test-merge << "SCRIPT"
set -x -e set -x -e
@ -37,6 +37,19 @@ sudo bash test-merge
'''.strip()) '''.strip())
def test_network_dns_conf(qemu):
SSH(qemu).check_call('''cat > test-merge << "SCRIPT"
set -x -e
cat /etc/resolv.conf | grep "search mydomain.com example.com"
cat /etc/resolv.conf | grep "nameserver 208.67.222.123"
cat /etc/resolv.conf | grep "nameserver 208.67.220.123"
SCRIPT
sudo bash test-merge
'''.strip())
def test_network_dns_ros_set(qemu): def test_network_dns_ros_set(qemu):
SSH(qemu).check_call(''' SSH(qemu).check_call('''
set -x -e set -x -e