Skip to content

Commit

Permalink
Fix a few more tests and remove redundent tests
Browse files Browse the repository at this point in the history
This removes some of the tests to check if softwires without psidmaps
errored as it doesn't make as much sense with the change. It also fixes
a few other little issues with some config tests.

Outstanding: ietf-softwire translation layer is yet to do so those tests
rightly fail.
  • Loading branch information
tsyesika committed Apr 19, 2017
1 parent 9e463a3 commit 7cb536a
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 79 deletions.
54 changes: 0 additions & 54 deletions src/program/lwaftr/tests/data/missing_softwire_psidmap.conf

This file was deleted.

9 changes: 0 additions & 9 deletions src/program/lwaftr/tests/subcommands/bench_test.py
Expand Up @@ -33,14 +33,5 @@ def test_bench_reconfigurable(self):
reconf_args.insert(3, '--reconfigurable')
self.execute_bench_test(reconf_args)

def test_config_with_invalid_softwire(self):
config_file = str(DATA_DIR / "missing_softwire_psidmap.conf")
invalid_softwire_args = list(self.cmd_args)
invalid_softwire_args[-3] = config_file
# Verify it errors when there is a softwire lacking a PSID mapping entry
err = "Started with config file that has softwire without PSID mapping"
with self.assertRaises(AssertionError, msg=err):
self.execute_bench_test(invalid_softwire_args)

if __name__ == '__main__':
unittest.main()
7 changes: 0 additions & 7 deletions src/program/lwaftr/tests/subcommands/config_test.py
Expand Up @@ -132,13 +132,6 @@ def test_add(self):
"""
Add a softwire section, get it back and check all the values.
"""
# Add a PSID map for the IP we're going to use.
psidmap_add_args = self.get_cmd_args('add')
psidmap_add_args.extend((
'/softwire-config/binding-table/psid-map',
'{ addr 1.2.3.4; psid-length 16; }'
))
self.run_cmd(psidmap_add_args)

# External IPv4.
add_args = self.get_cmd_args('add')
Expand Down
9 changes: 0 additions & 9 deletions src/program/lwaftr/tests/subcommands/run_test.py
Expand Up @@ -35,14 +35,5 @@ def test_run_reconfigurable(self):
reconf_args.insert(3, '--reconfigurable')
self.execute_run_test(reconf_args)

def test_config_with_invalid_softwire(self):
config_file = str(DATA_DIR / "missing_softwire_psidmap.conf")
invalid_softwire_args = list(self.cmd_args)
invalid_softwire_args[-5] = config_file
# Verify it errors when there is a softwire lacking a PSID mapping entry
err = "Started with config file that has softwire without PSID mapping"
with self.assertRaises(AssertionError, msg=err):
self.execute_run_test(invalid_softwire_args)

if __name__ == '__main__':
unittest.main()

0 comments on commit 7cb536a

Please sign in to comment.