30.Introduction to NUTS
Nikos Kallergis
18 steps
2 minutes
1
In your dev machine VSCode, click "New Terminal"
2
Type "poetry shell" to enter the project's virtual environment
3
Type "docker ps" and press Enter to see your running containerlab hosts
4
Open the existing "inventory/hosts.yaml"...
5
...and make sure it matches your actual running hosts
6
Right click on the "tests" folder...
7
...and create a new file named "test_lldp.yaml"
8
Define your LLDP test to run for the whole "eos" group. Don't forget to save!
9
Let's go back to the terminal
10
Type "pytest tests/\*" to execute your test. If everything has gone according to the plan, you should see all of your LLDP tests passing
11
Now, let's create our ping tests. Right click again on the "tests" folder
12
Create a new file named "test_ping.yaml"
13
Define your ping test. This time, we're using hosts instead of groups as the arguments are different for each one
14
Back to the terminal, let's run our tests again with "pytest tests/\*". This time, we see two of them failing - the ping tests. Can you guess why?
15
Fix the cause of the failure...
16
...and run the tests again until they pass :- )
17
Remember to destroy your running topology with "clab destroy" once you're done!
18
NUTS documentation may be found at <https://nuts.readthedocs.io/>
30.Introduction to NUTS
Nikos Kallergis
18 steps
2 minutes
1
In your dev machine VSCode, click "New Terminal"
2
Type "poetry shell" to enter the project's virtual environment
3
Type "docker ps" and press Enter to see your running containerlab hosts
4
Open the existing "inventory/hosts.yaml"...
5
...and make sure it matches your actual running hosts
6
Right click on the "tests" folder...
7
...and create a new file named "test_lldp.yaml"
8
Define your LLDP test to run for the whole "eos" group. Don't forget to save!
9
Let's go back to the terminal
10
Type "pytest tests/\*" to execute your test. If everything has gone according to the plan, you should see all of your LLDP tests passing
11
Now, let's create our ping tests. Right click again on the "tests" folder
12
Create a new file named "test_ping.yaml"
13
Define your ping test. This time, we're using hosts instead of groups as the arguments are different for each one
14
Back to the terminal, let's run our tests again with "pytest tests/\*". This time, we see two of them failing - the ping tests. Can you guess why?
15
Fix the cause of the failure...
16
...and run the tests again until they pass :- )
17
Remember to destroy your running topology with "clab destroy" once you're done!
18
NUTS documentation may be found at <https://nuts.readthedocs.io/>