Files
application/vcluster-0.21.1_old/tests/networkpolicy_test.yaml
2025-08-18 10:57:50 +03:30

50 lines
1.1 KiB
YAML

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