Add named ports to CRUD tests.
@@ -125,7 +125,32 @@ class TestCreateFromFile(TestBase):
'name': 'endpoint2'},
'spec': {'interfaceName': 'cali7',
'profiles': ['prof1',
- 'prof2']}
+ 'prof2'],
+ 'ports': [{"name": "tcp-port",
+ "port": 1234,
+ "protocol": "tcp"},
+ {"name": "udp-port",
+ "port": 5000,
+ "protocol": "udp"}]}
+ }),
+ ("workloadEndpoint1", {
+ 'apiVersion': 'v1',
+ 'kind': 'workloadEndpoint',
+ 'metadata': {'node': 'host2',
+ 'labels': {'type': 'frontend'},
+ 'name': 'endpoint2',
+ 'orchestrator': 'orch',
+ 'workload': 'workl'},
+ 'spec': {'interfaceName': 'cali7',
+ 'profiles': ['prof1',
+ 'prof2'],
+ 'ipNetworks': ['10.0.0.1/32'],
+ 'ports': [{"name": "tcp-port",
+ "port": 1234,
+ "protocol": "tcp"},
+ {"name": "udp-port",
+ "port": 5000,
+ "protocol": "udp"}]}
}),
("policy1", {'apiVersion': 'v1',
'kind': 'policy',
@@ -158,7 +183,8 @@ class TestCreateFromFile(TestBase):
'notTag': 'bartag',
'nets': ['10.0.0.0/16'],
'ports': [1234,
- '10:1024'],
+ '10:1024',
+ 'named-port'],
'selector':
"type=='application'",
'tag': 'footag'}}],
