Serialize the singleton kind fixture across worktrees
This commit is contained in:
parent
c4402985af
commit
7bd5316b1b
1 changed files with 18 additions and 3 deletions
|
|
@ -6,6 +6,8 @@ TESTBED="$ROOT/tests/kind"
|
|||
RUNTIME="$TESTBED/.runtime"
|
||||
BIN="$RUNTIME/bin"
|
||||
KUBECONFIG_PATH="$RUNTIME/kubeconfig"
|
||||
FIXTURE_LOCK_DIR="${XDG_RUNTIME_DIR:-/tmp/remora-$(id -u)}"
|
||||
FIXTURE_LOCK_PATH="$FIXTURE_LOCK_DIR/remora-testbed-kind.lock"
|
||||
CONTEXT=kind-remora-testbed
|
||||
CLUSTER=remora-testbed
|
||||
NERDCTL_NAMESPACE=remora-wp02
|
||||
|
|
@ -69,8 +71,8 @@ prepare_provider() {
|
|||
}
|
||||
|
||||
acquire_fixture_lock() {
|
||||
mkdir -p "$RUNTIME"
|
||||
exec 9>"$RUNTIME/fixture.lock"
|
||||
mkdir -p "$RUNTIME" "$FIXTURE_LOCK_DIR"
|
||||
exec 9>"$FIXTURE_LOCK_PATH"
|
||||
if ! flock --nonblock 9; then
|
||||
printf 'kind test fixture is already in use\n' >&2
|
||||
return 1
|
||||
|
|
|
|||
Loading…
Reference in a new issue