Skip to content

Commit

Permalink
Add docker e2e test for cluster deletion
Browse files Browse the repository at this point in the history
Signed-off-by: Warren Fernandes <[email protected]>
  • Loading branch information
Warren Fernandes committed Dec 17, 2019
1 parent c311529 commit 33f3da5
Show file tree
Hide file tree
Showing 4 changed files with 105 additions and 2 deletions.
28 changes: 28 additions & 0 deletions test/infrastructure/docker/e2e/docker_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,34 @@ import (
)

var _ = Describe("Docker", func() {
Describe("Cluster Deletion", func() {
namespace := "default"

clusterGen := &ClusterGenerator{}
nodeGen := &NodeGenerator{}
Context("Multi-node control plane cluster", func() {
It("should delete all artifacts related to the workload cluster", func() {
cluster, infraCluster := clusterGen.GenerateCluster(namespace)
nodes := make([]framework.Node, 3)
for i := range nodes {
nodes[i] = nodeGen.GenerateNode(cluster.Name)
}

input := &framework.MultiNodeControlplaneClusterInput{
Management: mgmt,
Cluster: cluster,
InfraCluster: infraCluster,
ControlplaneNodes: nodes,
CreateTimeout: 5 * time.Minute,
}

framework.DeleteCluster(input)

// no clean up is required
})
})
})

Describe("Cluster Creation", func() {

namespace := "default"
Expand Down
4 changes: 2 additions & 2 deletions test/infrastructure/docker/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,18 @@ require (
github.com/onsi/gomega v1.7.1
github.com/pkg/errors v0.8.1
k8s.io/api v0.0.0-20191121015604-11707872ac1c
k8s.io/apiextensions-apiserver v0.0.0-20190918201827-3de75813f604 // indirect
k8s.io/apimachinery v0.0.0-20191121015412-41065c7a8c2a
k8s.io/client-go v11.0.0+incompatible
k8s.io/klog v1.0.0
sigs.k8s.io/cluster-api v0.2.6-0.20191216153338-db9baf9ade0c
sigs.k8s.io/cluster-api/test/framework v0.0.0-20191216153338-db9baf9ade0c
sigs.k8s.io/controller-runtime v0.4.0
sigs.k8s.io/kind v0.5.1
sigs.k8s.io/kind v0.6.1
)

replace (
k8s.io/client-go => k8s.io/client-go v0.0.0-20190918160344-1fbdaa4c8d90
sigs.k8s.io/cluster-api => ../../..
sigs.k8s.io/cluster-api/test/framework => ../../framework
sigs.k8s.io/kind => sigs.k8s.io/kind v0.5.1
)
2 changes: 2 additions & 0 deletions test/infrastructure/docker/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,7 @@ go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/
go.uber.org/zap v0.0.0-20180814183419-67bc79d13d15/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
go.uber.org/zap v1.9.1 h1:XCJQEf3W6eZaVwhRBof6ImoYGJSITeKWsyeh3HFu/5o=
go.uber.org/zap v1.9.1/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
go.uber.org/zap v1.10.0 h1:ORx85nbTijNz8ljznvCMR1ZBIPKFn3jQrag10X2AsuM=
go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/crypto v0.0.0-20181025213731-e84da0312774/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
Expand Down Expand Up @@ -493,6 +494,7 @@ modernc.org/golex v1.0.0/go.mod h1:b/QX9oBD/LhixY6NDh+IdGv17hgB+51fET1i2kPSmvk=
modernc.org/mathutil v1.0.0/go.mod h1:wU0vUrJsVWBZ4P6e7xtFJEhFSNsfRLJ8H458uRjg03k=
modernc.org/strutil v1.0.0/go.mod h1:lstksw84oURvj9y3tn8lGvRxyRC1S2+g5uuIzNfIOBs=
modernc.org/xc v1.0.0/go.mod h1:mRNCo0bvLjGhHO9WsyuKVU4q0ceiDDDoEeWDJHrNx8I=
sigs.k8s.io/cluster-api/test/infrastructure/docker v0.0.0-20191217151159-8e57f0be14c0/go.mod h1:rgRQ1U631gWRlmjGgCLHlTkkjPdBZkclUjY1Kt7VSeU=
sigs.k8s.io/controller-runtime v0.4.0 h1:wATM6/m+3w8lj8FXNaO6Fs/rq/vqoOjO1Q116Z9NPsg=
sigs.k8s.io/controller-runtime v0.4.0/go.mod h1:ApC79lpY3PHW9xj/w9pj+lYkLgwAAUZwfXkME1Lajns=
sigs.k8s.io/kind v0.5.1 h1:BYnHEJ9DC+0Yjlyyehqd3xnKtEmFdLKU8QxqOqvQzdw=
Expand Down
Loading

0 comments on commit 33f3da5

Please sign in to comment.