From 15614bf1bcd5f7718c73721965ca4236637b6627 Mon Sep 17 00:00:00 2001 From: Sharif Elgamal Date: Tue, 2 Apr 2019 15:50:54 -0700 Subject: [PATCH 1/3] Add conformance test script --- hack/conformance_tests.sh | 56 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100755 hack/conformance_tests.sh diff --git a/hack/conformance_tests.sh b/hack/conformance_tests.sh new file mode 100755 index 000000000000..5d94a46c2dcc --- /dev/null +++ b/hack/conformance_tests.sh @@ -0,0 +1,56 @@ +#!/bin/sh +# This script executes the Kubernetes conformance tests in accordance with: +# https://github.com/cncf/k8s-conformance/blob/master/instructions.md +# +# Usage: +# conformance_tests.sh +# +# Example: +# conformance_tests.sh ./out/minikube --vm-driver=hyperkit +set -ex -o pipefail + +readonly PROFILE_NAME="k8sconformance" +readonly MINIKUBE=${1:-./out/minikube} +shift || true +readonly START_ARGS=$* + +# Requires a fully running Kubernetes cluster. +"${MINIKUBE}" delete -p "${PROFILE_NAME}" || true +"${MINIKUBE}" start -p "${PROFILE_NAME}" $START_ARGS +"${MINIKUBE}" status -p "${PROFILE_NAME}" +kubectl get pods --all-namespaces + +go get -u -v github.com/heptio/sonobuoy +sonobuoy run --wait +outdir="$(mktemp -d)" +sonobuoy retrieve "${outdir}" + +cwd=$(pwd) + +cd "${outdir}" +mkdir ./results; tar xzf *.tar.gz -C ./results + +version=$(${MINIKUBE} version | cut -d" " -f3) + +mkdir minikube-${version} +cd minikube-${version} + +cat <PRODUCT.yaml +vendor: minikube +name: minikube +version: ${version} +website_url: https://github.com/kubernetes/minikube +repo_url: https://github.com/kubernetes/minikube +documentation_url: https://github.com/kubernetes/minikube/blob/master/docs/README.md +product_logo_url: https://raw.githubusercontent.com/kubernetes/minikube/master/images/logo/logo.svg +type: installer +description: minikube runs a local Kubernetes cluster on macOS, Linux, and Windows. +EOF + +cat <README.md +./hack/conformance_tests.sh $MINIKUBE $START_ARGS +EOF + +cp ../results/plugins/e2e/results/* . +cd .. +cp -r minikube-${version} ${cwd} From 9565c9303a4109389cecf53500d3f02415bcacbf Mon Sep 17 00:00:00 2001 From: Sharif Elgamal Date: Tue, 2 Apr 2019 15:59:47 -0700 Subject: [PATCH 2/3] adding boilerplate --- hack/conformance_tests.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/hack/conformance_tests.sh b/hack/conformance_tests.sh index 5d94a46c2dcc..3d31d23a543c 100755 --- a/hack/conformance_tests.sh +++ b/hack/conformance_tests.sh @@ -1,4 +1,19 @@ #!/bin/sh + +# Copyright 2019 The Kubernetes Authors All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# # This script executes the Kubernetes conformance tests in accordance with: # https://github.com/cncf/k8s-conformance/blob/master/instructions.md # From a415ffef072ddbaf3e6437818d0df331af158cff Mon Sep 17 00:00:00 2001 From: Sharif Elgamal Date: Wed, 3 Apr 2019 11:12:08 -0700 Subject: [PATCH 3/3] fix boilerplate --- hack/conformance_tests.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hack/conformance_tests.sh b/hack/conformance_tests.sh index 3d31d23a543c..eb1564e58ef3 100755 --- a/hack/conformance_tests.sh +++ b/hack/conformance_tests.sh @@ -13,7 +13,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# + # This script executes the Kubernetes conformance tests in accordance with: # https://github.com/cncf/k8s-conformance/blob/master/instructions.md #