Skip to content

Commit

Permalink
Merge pull request #1991 from randomvariable/e2e-port-to-capi-framework
Browse files Browse the repository at this point in the history
Update to CAPI 0.3.10
  • Loading branch information
k8s-ci-robot authored Oct 2, 2020
2 parents 25226ca + 80ddb77 commit d2b61b7
Show file tree
Hide file tree
Showing 24 changed files with 323 additions and 720 deletions.
3 changes: 3 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ linters:
- gomnd
- godot
- gofumpt
- gci
- nlreturn
- gocritic
# Run with --fast=false for more extensive checks
fast: true
issues:
Expand Down
2 changes: 1 addition & 1 deletion clusterctl-settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"name": "infrastructure-aws",
"config": {
"componentsFile": "infrastructure-components.yaml",
"nextVersion": "v0.5.0"
"nextVersion": "v0.7.0"
}
}
8 changes: 7 additions & 1 deletion controllers/awsmachine_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,15 @@ var _ = Describe("AWSMachineReconciler", func() {
)
Expect(err).To(BeNil())

client := fake.NewFakeClient()
ctx := context.TODO()
client.Create(ctx, awsMachine)
client.Create(ctx, secret)
client.Create(ctx, secret)

ms, err = scope.NewMachineScope(
scope.MachineScopeParams{
Client: fake.NewFakeClient([]runtime.Object{awsMachine, secret}...),
Client: client,
Cluster: &clusterv1.Cluster{
Status: clusterv1.ClusterStatus{
InfrastructureReady: true,
Expand Down
18 changes: 8 additions & 10 deletions controllers/awsmachine_controller_unit_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ limitations under the License.
package controllers

import (
"context"
"testing"

v1 "k8s.io/api/core/v1"
Expand Down Expand Up @@ -78,15 +79,12 @@ func TestAWSMachineReconciler_AWSClusterToAWSMachines(t *testing.T) {
t.Fatal(err)
}
clusterName := "my-cluster"
initObjects := []runtime.Object{
newCluster(clusterName),
// Create two Machines with an infrastructure ref and one without.
newMachineWithInfrastructureRef(clusterName, "my-machine-0"),
newMachineWithInfrastructureRef(clusterName, "my-machine-1"),
newMachine(clusterName, "my-machine-2"),
}

client := fake.NewFakeClientWithScheme(scheme, initObjects...)
client := fake.NewFakeClientWithScheme(scheme)
ctx := context.TODO()
client.Create(ctx, newCluster(clusterName))
client.Create(ctx, newMachineWithInfrastructureRef(clusterName, "my-machine-0"))
client.Create(ctx, newMachineWithInfrastructureRef(clusterName, "my-machine-1"))
client.Create(ctx, newMachine(clusterName, "my-machine-2"))

reconciler := &AWSMachineReconciler{
Client: client,
Expand All @@ -108,6 +106,6 @@ func TestAWSMachineReconciler_AWSClusterToAWSMachines(t *testing.T) {
},
})
if len(requests) != 2 {
t.Fatalf("Expected 2 but found %d requests", len(initObjects))
t.Fatalf("Expected 2 but found %d requests", len(requests))
}
}
26 changes: 13 additions & 13 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,31 @@ module sigs.k8s.io/cluster-api-provider-aws
go 1.13

require (
github.com/aws/aws-sdk-go v1.34.16
github.com/awslabs/goformation/v4 v4.11.0
github.com/aws/aws-sdk-go v1.35.0
github.com/awslabs/goformation/v4 v4.15.0
github.com/blang/semver v3.5.1+incompatible
github.com/go-logr/logr v0.1.0
github.com/golang/mock v1.4.3
github.com/google/goexpect v0.0.0-20200703111054-623d5ca06f56
github.com/google/goterm v0.0.0-20190703233501-fc88cf888a3f // indirect
github.com/onsi/ginkgo v1.12.2
github.com/onsi/gomega v1.10.1
github.com/golang/mock v1.4.4
github.com/google/goexpect v0.0.0-20200816234442-b5b77125c2c5
github.com/google/goterm v0.0.0-20200907032337-555d40f16ae2 // indirect
github.com/onsi/ginkgo v1.14.1
github.com/onsi/gomega v1.10.2
github.com/pkg/errors v0.9.1
github.com/prometheus/client_golang v1.5.1
github.com/sergi/go-diff v1.0.0
github.com/prometheus/client_golang v1.7.1
github.com/sergi/go-diff v1.1.0
github.com/spf13/cobra v1.0.0
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/spf13/pflag v1.0.5
golang.org/x/crypto v0.0.0-20200510223506-06a226fb4e37
golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2
golang.org/x/crypto v0.0.0-20200930160638-afb6bcd081ae
golang.org/x/net v0.0.0-20200930145003-4acb6c075d10
k8s.io/api v0.17.9
k8s.io/apimachinery v0.17.9
k8s.io/client-go v0.17.9
k8s.io/component-base v0.17.9
k8s.io/klog v1.0.0
k8s.io/utils v0.0.0-20200619165400-6e3d28b6ed19
k8s.io/utils v0.0.0-20200912215256-4140de9c8800
sigs.k8s.io/aws-iam-authenticator v0.5.1
sigs.k8s.io/cluster-api v0.3.9
sigs.k8s.io/cluster-api v0.3.10
sigs.k8s.io/controller-runtime v0.5.11
sigs.k8s.io/yaml v1.2.0
)
78 changes: 51 additions & 27 deletions go.sum

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions hack/tools/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ module sigs.k8s.io/cluster-api-provider-aws/hack/tools
go 1.13

require (
github.com/a8m/envsubst v1.1.0
github.com/golang/mock v1.3.1
github.com/golangci/golangci-lint v1.28.1
github.com/onsi/ginkgo v1.12.0
k8s.io/code-generator v0.18.0
sigs.k8s.io/cluster-api/hack/tools v0.0.0-20200912115857-c8b8d0f98f4b
github.com/a8m/envsubst v1.2.0
github.com/golang/mock v1.4.4
github.com/golangci/golangci-lint v1.31.0
github.com/onsi/ginkgo v1.14.1
k8s.io/code-generator v0.18.8
sigs.k8s.io/cluster-api/hack/tools v0.0.0-20201001010053-9e2a7c7a886a
sigs.k8s.io/controller-tools v0.2.9
sigs.k8s.io/kind v0.6.1
sigs.k8s.io/kustomize/kustomize/v3 v3.5.4
Expand Down
Loading

0 comments on commit d2b61b7

Please sign in to comment.