Skip to content

Commit

Permalink
add hostPort and containerPort test case
Browse files Browse the repository at this point in the history
  • Loading branch information
BenTheElder committed Nov 28, 2019
1 parent ba26f74 commit e3b2da0
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/internal/apis/config/encoding/load_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,11 @@ func TestLoadCurrent(t *testing.T) {
Path: "./testdata/v1alpha4/valid-kind-workers-patches.yaml",
ExpectError: false,
},
{
TestName: "v1alpha4 config with port mapping and mount",
Path: "./testdata/v1alpha4/valid-port-and-mount.yaml",
ExpectError: false,
},
{
TestName: "v1alpha4 non-existent field",
Path: "./testdata/v1alpha4/invalid-bogus-field.yaml",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
- role: control-plane
# map an extra port
extraPortMappings:
- hostPort: 80
containerPort: 80
# mount an extra path from the host
extraMounts:
- hostPath: ./foo
containerPath: /bar

0 comments on commit e3b2da0

Please sign in to comment.