Skip to content

Commit

Permalink
add networking api tests
Browse files Browse the repository at this point in the history
  • Loading branch information
deads2k committed Aug 21, 2023
1 parent b746581 commit 8bd47b2
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 0 deletions.
21 changes: 21 additions & 0 deletions operator/v1/custom.network.testsuite.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
apiVersion: apiextensions.k8s.io/v1 # Hack because controller-gen complains if we don't have this
name: "[Stable] Network"
crd: 0000_70_cluster-network-operator_01-Custom.crd.yaml
tests:
onCreate:
- name: Should be able to create migration mode
initial: |
apiVersion: operator.openshift.io/v1
kind: Network
spec:
migration:
mode: Live
expected: |
apiVersion: operator.openshift.io/v1
kind: Network
spec:
disableNetworkDiagnostics: false
logLevel: Normal
operatorLogLevel: Normal
migration:
mode: Live
14 changes: 14 additions & 0 deletions operator/v1/stable.network.testsuite.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,17 @@ tests:
disableNetworkDiagnostics: false
logLevel: Normal
operatorLogLevel: Normal
- name: Should not be able to create migration mode
initial: |
apiVersion: operator.openshift.io/v1
kind: Network
spec:
migration:
mode: Live
expected: |
apiVersion: operator.openshift.io/v1
kind: Network
spec:
disableNetworkDiagnostics: false
logLevel: Normal
operatorLogLevel: Normal
21 changes: 21 additions & 0 deletions operator/v1/techpreview.network.testsuite.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
apiVersion: apiextensions.k8s.io/v1 # Hack because controller-gen complains if we don't have this
name: "[Stable] Network"
crd: 0000_70_cluster-network-operator_01-TechPreviewNoUpgrade.crd.yaml
tests:
onCreate:
- name: Should be able to create migration mode
initial: |
apiVersion: operator.openshift.io/v1
kind: Network
spec:
migration:
mode: Live
expected: |
apiVersion: operator.openshift.io/v1
kind: Network
spec:
disableNetworkDiagnostics: false
logLevel: Normal
operatorLogLevel: Normal
migration:
mode: Live

0 comments on commit 8bd47b2

Please sign in to comment.