Skip to content
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

prepare v0.5.11 release #510

Merged
merged 13 commits into from
Nov 8, 2022
9 changes: 8 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,15 @@ integration:
./hack/test-integration.sh

.PHONY: e2e
e2e:
e2e: bin
ifeq ($(RUNNER),kops)
./hack/e2e/run.sh
else ifeq ($(RUNNER),kind)
./hack/start-dev-env-dynamicfile.sh
./hack/stop-dev-env.sh
else
echo "make e2e RUNNER=[kops|kind]"
endif

.PHONY: format
format:
Expand Down
2 changes: 1 addition & 1 deletion hack/dev/extract_ca_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
kubeconfig = args.kubeconfig
cluster = args.cluster
with open(kubeconfig, 'r') as f:
config = yaml.load(f)
config = yaml.safe_load(f)
clusters = config['clusters']
for c in clusters:
if c['name'] == cluster:
Expand Down
16 changes: 16 additions & 0 deletions hack/e2e-dynamicfile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,22 @@ REGION=${AWS_REGION:-us-west-2}
AWS_ACCOUNT=$(aws sts get-caller-identity --query "Account" --output text)
AWS_TEST_ROLE=${AWS_TEST_ROLE-authenticator-dev-cluster-testrole}


function e2e_mountfile() {
sleep 5
set +e
OUT=$(kubectl --kubeconfig=${kubectl_kubeconfig} --context="test-authenticator" get nodes|grep Ready 2>/dev/null)
echo $OUT
if [ ! -z "$OUT" ]
then
echo "e2e mountfile test pass"
else
echo "e2e mountfile test fail"
exit 1
fi

}

function e2e_dynamicfile(){
set +e
RoleOutput=$(aws iam get-role --role-name authenticator-dev-cluster-testrole 2>/dev/null)
Expand Down
5 changes: 3 additions & 2 deletions hack/start-dev-env-dynamicfile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ write_kind_config
create_kind_cluster
certificate_authority_data="$(extract_certificate_authority_data)"
write_kubectl_kubeconfig
echo "start end to end testing for mountfile mode"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My only nit is this is called "start dev env" but its used to run e2e tests. Do you use this for both? I'd like to separate them and have e2e tests run from the e2e script and dev envs set up from the dev script, and just have options to choose between dynamic file or other backends. We can do that in a future improvement if you'd like.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks @nckturner! this is a good point. I will create a separate PR after this cherry-pick to move the e2e out.

e2e_mountfile
echo "starting end to end testing for dynamicfile mode"
e2e_dynamicfile

e2e_dynamicfile