-
Notifications
You must be signed in to change notification settings - Fork 580
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Real e2e #573
Real e2e #573
Changes from all commits
d9b9d65
0b0b123
05957fe
c638833
42fb724
2f98204
6a16332
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -80,4 +80,6 @@ GIT_VERSION ${GIT_VERSION-} | |
GIT_BRANCH ${GIT_BRANCH-} | ||
GIT_RELEASE_TAG ${GIT_RELEASE_TAG-} | ||
GIT_RELEASE_COMMIT ${GIT_RELEASE_COMMIT-} | ||
AWS_ACCESS_KEY_ID ${AWS_ACCESS_KEY_ID-} | ||
AWS_SECRET_ACCESS_KEY ${AWS_SECRET_ACCESS_KEY-} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Are these here only for current test/debugging purposes? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There's not very many ways to get external variables into Bazel unfortunately :( This was the best solution I've found. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is the output of |
||
EOF |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,59 @@ | ||
load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") | ||
load("@io_bazel_rules_go//go:def.bzl", "go_test") | ||
|
||
go_test( | ||
name = "go_default_test", | ||
size = "large", | ||
srcs = [ | ||
"aws_test.go", | ||
"e2e_suite_test.go", | ||
"metacluster_test.go", | ||
], | ||
args = [ | ||
"-kindBinary=$(location @io_k8s_sigs_kind//:kind)", | ||
"-kubectlBinary=$(location @io_k8s_kubernetes//cmd/kubectl:kubectl)", | ||
"-awsProviderYAML=$(location //config:aws-provider-yaml)", | ||
"-clusterAPIYAML=$(location //vendor/sigs.k8s.io/cluster-api/config:cluster-api-yaml)", | ||
"-managerImageTar=$(location //cmd/manager:manager-amd64.tar)", | ||
"-credFile=$(location //config:credential_file)", | ||
"-clusterYAML=$(location //cmd/clusterctl/examples/aws:out/cluster.yaml)", | ||
"-machineYAML=$(location //cmd/clusterctl/examples/aws:out/machines.yaml)", | ||
], | ||
data = [ | ||
"//cmd/clusterctl/examples/aws:out/cluster.yaml", | ||
"//cmd/clusterctl/examples/aws:out/machines.yaml", | ||
"//config:aws-provider-yaml", | ||
"//config:credential_file", | ||
"//vendor/sigs.k8s.io/cluster-api/config:cluster-api-yaml", | ||
"//cmd/manager:manager-amd64.tar", | ||
"@io_k8s_kubernetes//cmd/kubectl:kubectl", | ||
"@io_k8s_sigs_kind//:kind", | ||
], | ||
embed = [":go_default_library"], | ||
rundir = ".", | ||
deps = [ | ||
"//pkg/apis/awsprovider/v1alpha1:go_default_library", | ||
"//pkg/cloud/aws/actuators:go_default_library", | ||
"//pkg/cloud/aws/actuators/machine:go_default_library", | ||
"//pkg/cloud/aws/services/awserrors:go_default_library", | ||
"//pkg/cloud/aws/services/cloudformation:go_default_library", | ||
"//pkg/cloud/aws/services/sts:go_default_library", | ||
"//test/e2e/util/kind:go_default_library", | ||
"//vendor/github.com/aws/aws-sdk-go/aws:go_default_library", | ||
"//vendor/github.com/aws/aws-sdk-go/aws/client:go_default_library", | ||
"//vendor/github.com/aws/aws-sdk-go/aws/credentials:go_default_library", | ||
"//vendor/github.com/aws/aws-sdk-go/aws/session:go_default_library", | ||
"//vendor/github.com/aws/aws-sdk-go/service/cloudformation:go_default_library", | ||
"//vendor/github.com/aws/aws-sdk-go/service/ec2:go_default_library", | ||
"//vendor/github.com/aws/aws-sdk-go/service/sts:go_default_library", | ||
"//vendor/github.com/onsi/ginkgo:go_default_library", | ||
"//vendor/github.com/onsi/gomega:go_default_library", | ||
"//vendor/github.com/onsi/gomega/gstruct:go_default_library", | ||
"//vendor/github.com/onsi/gomega/types:go_default_library", | ||
"//vendor/k8s.io/api/apps/v1:go_default_library", | ||
"//vendor/k8s.io/api/core/v1:go_default_library", | ||
"//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", | ||
"//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", | ||
"//vendor/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library", | ||
"//vendor/k8s.io/client-go/kubernetes:go_default_library", | ||
"//vendor/sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1:go_default_library", | ||
"//vendor/sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset:go_default_library", | ||
"//vendor/sigs.k8s.io/cluster-api/pkg/controller/machine:go_default_library", | ||
], | ||
) | ||
|
||
go_library( | ||
name = "go_default_library", | ||
srcs = ["e2e.go"], | ||
importpath = "sigs.k8s.io/cluster-api-provider-aws/test/e2e", | ||
visibility = ["//visibility:public"], | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will this cause issues with local dev workflows by assuming creds are always in bazel-out/volatile-status.txt?
Or am I potentially misreading what this is doing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
volatile status gets repopulated from env when you run go test, so basically it's just assuming these are in the user's environment. I don't really know how else to get the creds inside, though it seems like @randomvariable is changing how this works anyway?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May be able to use bazel configs as switches to choose where it looks. Too much work right now I think though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Re-reading, will need to support AWS_SESSION_TOKEN too, but can fix up in follow up PR.