-
Notifications
You must be signed in to change notification settings - Fork 740
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Test with pytest from tox instead of using Ansible * Update tests to run with python3.6 * Update netiron show monitor commands to use a single template * Remove redundant test, ``test_that_all_entries_dicts_match`` * Change to using yaml's safe_load method * Group tests together in order to load files and call TextFSM once, which creates faster test runs * Fix spacing and styling * Add failure messages to tests
- Loading branch information
1 parent
29c693d
commit 80b5171
Showing
28 changed files
with
153 additions
and
171 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -93,7 +93,7 @@ dist/ | |
downloads/ | ||
eggs/ | ||
.eggs/ | ||
lib/ | ||
#lib/ | ||
lib64/ | ||
parts/ | ||
sdist/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../templates |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
"""tests.""" | ||
|
||
import os | ||
import csv | ||
|
||
from ntc_templates.parse import _get_template_dir | ||
|
||
|
||
def load_index_data(): | ||
"""Load data from index file.""" | ||
index_data = [] | ||
with open('%s%sindex' % (_get_template_dir(), os.sep)) as indexfs: | ||
data = csv.reader(indexfs) | ||
for row in data: | ||
if len(row) > 2 and row[0] != 'Template': | ||
index_data.append(row) | ||
return index_data |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
18 changes: 0 additions & 18 deletions
18
tests/brocade_netiron/show_monitor_config/brocade_netiron_show_monitor.parsed
This file was deleted.
Oops, something went wrong.
12 changes: 0 additions & 12 deletions
12
tests/brocade_netiron/show_monitor_config/brocade_netiron_show_monitor.raw
This file was deleted.
Oops, something went wrong.
30 changes: 30 additions & 0 deletions
30
tests/cisco_ios/show_ip_ospf_neighbor/four_neighbors.parsed
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
--- | ||
parsed_sample: | ||
|
||
- neighbor_id: '10.190.30.2' | ||
priority: '1' | ||
state: 'FULL/BDR' | ||
dead_time: '00:00:04' | ||
address: '10.190.16.11' | ||
interface: 'GigabitEthernet0/2.101' | ||
|
||
- neighbor_id: '10.190.30.3' | ||
priority: '1' | ||
state: 'FULL/DR' | ||
dead_time: '00:00:04' | ||
address: '10.190.16.12' | ||
interface: 'GigabitEthernet0/2.101' | ||
|
||
- neighbor_id: '10.190.30.2' | ||
priority: '1' | ||
state: 'FULL/BDR' | ||
dead_time: '00:00:04' | ||
address: '10.190.16.3' | ||
interface: 'GigabitEthernet0/2.100' | ||
|
||
- neighbor_id: '10.190.30.3' | ||
priority: '1' | ||
state: 'FULL/DR' | ||
dead_time: '00:00:04' | ||
address: '10.190.16.4' | ||
interface: 'GigabitEthernet0/2.100' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Neighbor ID Pri State Dead Time Address Interface | ||
10.190.30.2 1 FULL/BDR 00:00:04 10.190.16.11 GigabitEthernet0/2.101 | ||
10.190.30.3 1 FULL/DR 00:00:04 10.190.16.12 GigabitEthernet0/2.101 | ||
10.190.30.2 1 FULL/BDR 00:00:04 10.190.16.3 GigabitEthernet0/2.100 | ||
10.190.30.3 1 FULL/DR 00:00:04 10.190.16.4 GigabitEthernet0/2.100 |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.