[sonic-cfggen]: Add a unit-test in sonic-cfggen to test argument "--var-json" (#2906)
This commit is contained in:
parent
222706120d
commit
6aad2da475
@ -65,6 +65,11 @@ class TestCfgGen(TestCase):
|
||||
output = self.run_script(argument)
|
||||
self.assertEqual(output.strip(), 'value1')
|
||||
|
||||
def test_var_json_data(self):
|
||||
argument = '-m "' + self.sample_graph_simple + '" -p "' + self.port_config + '" --var-json VLAN_MEMBER'
|
||||
output = self.run_script(argument)
|
||||
self.assertEqual(output.strip(), '{\n "Vlan1000|Ethernet8": {\n "tagging_mode": "untagged"\n }\n}')
|
||||
|
||||
def test_read_yaml(self):
|
||||
argument = '-v yml_item -y ' + os.path.join(self.test_dir, 'test.yml')
|
||||
output = self.run_script(argument)
|
||||
|
Reference in New Issue
Block a user