diff options
| author | Jenkins <jenkins@review.openstack.org> | 2016-12-01 21:57:15 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2016-12-01 21:57:15 +0000 |
| commit | 3a509be871ec104e46f4a2c11503bdfee0e863b4 (patch) | |
| tree | b394301cb7bea9fae81e88010e629f827860e7d3 /openstackclient/tests | |
| parent | d6e058fa1f6323ef73354f0aea0e09efb647bc7e (diff) | |
| parent | abfcd7810cb5937060fd9ae290f07a48226c9ced (diff) | |
| download | python-openstackclient-3a509be871ec104e46f4a2c11503bdfee0e863b4.tar.gz | |
Merge "Introduce overwrite functionality in ``osc subnet set``"
Diffstat (limited to 'openstackclient/tests')
| -rw-r--r-- | openstackclient/tests/unit/network/v2/test_subnet.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/openstackclient/tests/unit/network/v2/test_subnet.py b/openstackclient/tests/unit/network/v2/test_subnet.py index 2d51aa4a..e7406575 100644 --- a/openstackclient/tests/unit/network/v2/test_subnet.py +++ b/openstackclient/tests/unit/network/v2/test_subnet.py @@ -925,13 +925,16 @@ class TestSetSubnet(TestSubnet): {'host_routes': [{'destination': '10.20.20.0/24', 'nexthop': '10.20.20.1'}], 'allocation_pools': [{'start': '8.8.8.200', - 'end': '8.8.8.250'}], }) + 'end': '8.8.8.250'}], + 'dns_nameservers': ["10.0.0.1"], }) self.network.find_subnet = mock.Mock(return_value=_testsubnet) arglist = [ '--host-route', 'destination=10.30.30.30/24,gateway=10.30.30.1', '--no-host-route', '--allocation-pool', 'start=8.8.8.100,end=8.8.8.150', '--no-allocation-pool', + '--dns-nameserver', '10.1.10.1', + '--no-dns-nameservers', _testsubnet.name, ] verifylist = [ @@ -939,6 +942,8 @@ class TestSetSubnet(TestSubnet): "destination": "10.30.30.30/24", "gateway": "10.30.30.1"}]), ('allocation_pools', [{ 'start': '8.8.8.100', 'end': '8.8.8.150'}]), + ('dns_nameservers', ['10.1.10.1']), + ('no_dns_nameservers', True), ('no_host_route', True), ('no_allocation_pool', True), ] @@ -948,6 +953,7 @@ class TestSetSubnet(TestSubnet): 'host_routes': [{ "destination": "10.30.30.30/24", "nexthop": "10.30.30.1"}], 'allocation_pools': [{'start': '8.8.8.100', 'end': '8.8.8.150'}], + 'dns_nameservers': ["10.1.10.1"], } self.network.update_subnet.assert_called_once_with( _testsubnet, **attrs) |
