Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions tests/api/test_switch_tunnel.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
from pprint import pprint


class TestSaiSwitchTunnel:
# object with no parents

def test_switch_tunnel_create(self, npu):
commands = [
{
'name': 'switch_tunnel_1',
'op': 'create',
'type': 'SAI_OBJECT_TYPE_SWITCH_TUNNEL',
'attributes': [
'SAI_SWITCH_TUNNEL_ATTR_TUNNEL_TYPE',
'SAI_TUNNEL_TYPE_IPINIP',
],
}
]

results = [*npu.process_commands(commands)]
print('======= SAI commands RETURN values create =======')
pprint(results)
assert all(results), 'Create error'

def test_switch_tunnel_remove(self, npu):
commands = [{'name': 'switch_tunnel_1', 'op': 'remove'}]

results = [*npu.process_commands(commands)]
print('======= SAI commands RETURN values remove =======')
pprint(results)
assert all(
[result == 'SAI_STATUS_SUCCESS' for result in results]
), 'Remove error'