From c05b303db5166c64325359c165f62aed7e836528 Mon Sep 17 00:00:00 2001 From: Ganesh Nalawade Date: Wed, 9 Aug 2017 15:17:36 +0530 Subject: [PATCH] junos lldp interface test fix (#27946) --- .../targets/junos_lldp_interface/tests/netconf/basic.yaml | 6 +++--- .../targets/net_lldp_interface/tests/junos/basic.yaml | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/test/integration/targets/junos_lldp_interface/tests/netconf/basic.yaml b/test/integration/targets/junos_lldp_interface/tests/netconf/basic.yaml index 51c82e5352..4c28a3cc21 100644 --- a/test/integration/targets/junos_lldp_interface/tests/netconf/basic.yaml +++ b/test/integration/targets/junos_lldp_interface/tests/netconf/basic.yaml @@ -66,7 +66,7 @@ - assert: that: - "result.changed == true" - - "'[edit protocols lldp interface ge-0/0/5]\n+ disable;' in result.diff.prepared" + - result.diff.prepared | search("\+ *disable") - name: Enable lldp on particular interface junos_lldp_interface: @@ -78,7 +78,7 @@ - assert: that: - "result.changed == true" - - "'[edit protocols lldp interface ge-0/0/5]\n- disable;' in result.diff.prepared" + - result.diff.prepared | search("\- *disable") - name: Delete lldp on particular interface junos_lldp_interface: @@ -90,7 +90,7 @@ - assert: that: - "result.changed == true" - - "'[edit protocols lldp]\n- interface ge-0/0/5;' in result.diff.prepared" + - result.diff.prepared | search("\- *interface ge-0/0/5") - name: Delete lldp on particular interface (idempotent) junos_lldp_interface: diff --git a/test/integration/targets/net_lldp_interface/tests/junos/basic.yaml b/test/integration/targets/net_lldp_interface/tests/junos/basic.yaml index 820881572b..dc83484014 100644 --- a/test/integration/targets/net_lldp_interface/tests/junos/basic.yaml +++ b/test/integration/targets/net_lldp_interface/tests/junos/basic.yaml @@ -17,7 +17,7 @@ - assert: that: - "result.changed == true" - - "'+ interface ge-0/0/5;' in result.diff.prepared" + - result.diff.prepared | search("\+ *interface ge-0/0/5") - name: lldp interface configuration (idempotent) net_lldp_interface: @@ -40,7 +40,7 @@ - assert: that: - "result.changed == true" - - "'[edit protocols lldp interface ge-0/0/5]\n+ disable;' in result.diff.prepared" + - result.diff.prepared | search("\+ *disable") - name: Enable lldp on particular interface net_lldp_interface: @@ -52,7 +52,7 @@ - assert: that: - "result.changed == true" - - "'[edit protocols lldp interface ge-0/0/5]\n- disable;' in result.diff.prepared" + - result.diff.prepared | search("\+ *disable") - name: Delete lldp on particular interface net_lldp_interface: @@ -64,7 +64,7 @@ - assert: that: - "result.changed == true" - - "'[edit protocols lldp]\n- interface ge-0/0/5;' in result.diff.prepared" + - result.diff.prepared | search("\- *interface ge-0/0/5") - name: Delete lldp on particular interface (idempotent) net_lldp_interface: