From 89b73cb5355930b64a90b67402c98b8964f2855d Mon Sep 17 00:00:00 2001 From: Paul Belanger Date: Mon, 27 May 2019 13:11:58 -0400 Subject: [PATCH] ios_ntp: Switch interface to GigabitEthernet0/1 for tests (#56964) * ios_ntp: Switch interface to GigabitEthernet0/1 for tests Lets use an interface we know that exists for testing, in some cases Loopback0 maybe not be configured. Signed-off-by: Paul Belanger * ios_ntp: properly register result variable for testing This is currently broken, and tests don't work. Fix this by properly registering the result variable. Signed-off-by: Paul Belanger --- .../targets/ios_ntp/tests/cli/ntp_configuration.yaml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/test/integration/targets/ios_ntp/tests/cli/ntp_configuration.yaml b/test/integration/targets/ios_ntp/tests/cli/ntp_configuration.yaml index 07de735c102..36efe5f0650 100644 --- a/test/integration/targets/ios_ntp/tests/cli/ntp_configuration.yaml +++ b/test/integration/targets/ios_ntp/tests/cli/ntp_configuration.yaml @@ -2,7 +2,7 @@ - name: remove NTP (if set) ios_ntp: &remove server: 10.75.32.5 - source_int: Loopback0 + source_int: "{{ test_interface }}" acl: NTP_ACL logging: true key_id: 10 @@ -16,8 +16,9 @@ - name: configure NTP ios_ntp: &config server: 10.75.32.5 - source_int: Loopback0 + source_int: "{{ test_interface }}" state: present + register: result - assert: &true that: @@ -25,6 +26,7 @@ - name: idempotence check ios_ntp: *config + register: result - assert: &false that: @@ -35,11 +37,13 @@ acl: NTP_ACL logging: true state: present + register: result - assert: *true - name: idempotence check ios_ntp: *config1 + register: result - assert: *false @@ -49,11 +53,13 @@ auth_key: 15435A030726242723273C21181319000A auth: true state: present + register: result - assert: *true - name: idempotence check ios_ntp: *config2 + register: result - assert: *false @@ -62,11 +68,13 @@ acl: NTP_ACL logging: true state: absent + register: result - assert: *true - name: idempotence check ios_ntp: *config3 + register: result - assert: *false