Skip to content

Commit

Permalink
test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
fabriziopandini committed Dec 4, 2018
1 parent 10e6e43 commit c1fb303
Show file tree
Hide file tree
Showing 10 changed files with 49 additions and 5 deletions.
6 changes: 3 additions & 3 deletions pkg/cluster/config/encoding/testdata/invalid-apiversion.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# this file contains an invalid config api version for testing
kind: Config
apiVersion: not-valid
# this file contains an invalid config kind for testing
kind: not-valid
apiVersion: kind.sigs.k8s.io/v1alpha2
3 changes: 3 additions & 0 deletions pkg/cluster/config/encoding/testdata/invalid-kind.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# this file contains an invalid config api version for testing
kind: Node
apiVersion: not-valid
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# this file contains an invalid config without apiVersion for testing
kind: Node
2 changes: 2 additions & 0 deletions pkg/cluster/config/encoding/testdata/invalid-no-kind.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# this file contains an invalid config without kind for testing
apiVersion: kind.sigs.k8s.io/v1alpha2
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# invalid v1alpha1 config file with two documents
kind: Config
apiVersion: kind.sigs.k8s.io/v1alpha1
---
kind: Config
apiVersion: kind.sigs.k8s.io/v1alpha1
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# invalid config file with nodes with the same name
kind: Node
apiVersion: kind.sigs.k8s.io/v1alpha2
---
kind: Node
apiVersion: kind.sigs.k8s.io/v1alpha2
18 changes: 18 additions & 0 deletions pkg/cluster/config/encoding/testdata/v1alpha2/valid-full-ha.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# technically valid, config file with a full ha cluster
kind: Node
apiVersion: kind.sigs.k8s.io/v1alpha2
role: control-plane
replicas: 3
---
kind: Node
apiVersion: kind.sigs.k8s.io/v1alpha2
role: worker
replicas: 2
---
kind: Node
apiVersion: kind.sigs.k8s.io/v1alpha2
role: external-etcd
---
kind: Node
apiVersion: kind.sigs.k8s.io/v1alpha2
role: external-load-balancer
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# technically valid, minimal config file with two nodes
kind: Node
apiVersion: kind.sigs.k8s.io/v1alpha2
---
kind: Node
apiVersion: kind.sigs.k8s.io/v1alpha2
role: worker
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# technically valid, minimal config file
kind: Config
kind: Node
apiVersion: kind.sigs.k8s.io/v1alpha2
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
kind: Config
kind: Node
apiVersion: kind.sigs.k8s.io/v1alpha2
nodeLifecycle:
preKubeadm:
Expand Down

0 comments on commit c1fb303

Please sign in to comment.