From be21dcca6ac926fbfb2fbae6ad55d7264b22a959 Mon Sep 17 00:00:00 2001 From: rjsadow Date: Mon, 15 Jan 2024 14:30:08 -0500 Subject: [PATCH] Added dry-run test Signed-off-by: rjsadow --- hack/dryrun-e2e.sh | 59 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 hack/dryrun-e2e.sh diff --git a/hack/dryrun-e2e.sh b/hack/dryrun-e2e.sh new file mode 100644 index 0000000..09be4c3 --- /dev/null +++ b/hack/dryrun-e2e.sh @@ -0,0 +1,59 @@ +#!/bin/bash +# Copyright 2024 The Kubernetes Authors. +# +# 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. + +set -o errexit -o nounset -o xtrace + +# Default versions k8s and kind +K8S_VERSION=${K8S_VERSION:-v1.29.0} +KIND_VERSION=${KIND_VERSION:-v0.20.0} + +# Maximum time (in seconds) for a dry run test +DRYRUN_THRESHOLD=${DRYRUN_DURATION:-5} + +# Set the artifacts directory, defaulting to a local subdirectory +export ARTIFACTS="${ARTIFACTS:-${PWD}/_artifacts}" +mkdir -p "${ARTIFACTS}/results" + +# Download and install kind +curl -fsSL -o ./kind "https://kind.sigs.k8s.io/dl/${KIND_VERSION}/kind-linux-amd64" +install --mode=755 ./kind /usr/local/bin/kind + +# Create a kind cluster with a specific Kubernetes version that will match the hydrophone test +cat <