rename old
This commit is contained in:
49
vcluster-0.21.1/tests/networkpolicy_test.yaml
Normal file
49
vcluster-0.21.1/tests/networkpolicy_test.yaml
Normal file
@@ -0,0 +1,49 @@
|
||||
suite: NetworkPolicy
|
||||
templates:
|
||||
- networkpolicy.yaml
|
||||
|
||||
tests:
|
||||
- it: should not create network policy by default
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 0
|
||||
|
||||
- it: check defaults
|
||||
release:
|
||||
name: my-release
|
||||
namespace: my-namespace
|
||||
set:
|
||||
policies:
|
||||
networkPolicy:
|
||||
enabled: true
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 2
|
||||
- documentIndex: 0
|
||||
equal:
|
||||
path: metadata.name
|
||||
value: vc-work-my-release
|
||||
- documentIndex: 0
|
||||
equal:
|
||||
path: spec.egress[2].to[1].ipBlock.cidr
|
||||
value: 0.0.0.0/0
|
||||
- documentIndex: 1
|
||||
equal:
|
||||
path: metadata.name
|
||||
value: vc-cp-my-release
|
||||
- documentIndex: 0
|
||||
equal:
|
||||
path: metadata.namespace
|
||||
value: my-namespace
|
||||
- documentIndex: 1
|
||||
equal:
|
||||
path: metadata.namespace
|
||||
value: my-namespace
|
||||
- documentIndex: 0
|
||||
lengthEqual:
|
||||
path: spec.egress
|
||||
count: 3
|
||||
- documentIndex: 1
|
||||
lengthEqual:
|
||||
path: spec.egress
|
||||
count: 2
|
||||
Reference in New Issue
Block a user