Skip to content

Commit

Permalink
Merge pull request #15672 from fuweid/cleanup-15514
Browse files Browse the repository at this point in the history
chore: cleanup #15514 (Rewrite etcd scripts in strict mode)
  • Loading branch information
ahrtr authored Apr 13, 2023
2 parents 29e7971 + 9f034fb commit 22f3e50
Show file tree
Hide file tree
Showing 132 changed files with 144 additions and 3,502 deletions.
11 changes: 10 additions & 1 deletion pkg/proxy/fixtures/gencerts.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,21 @@
#!/bin/bash

set -euo pipefail

if ! [[ "$0" =~ "./gencerts.sh" ]]; then
echo "must be run from 'fixtures'"
exit 255
fi

if ! which cfssl; then
if ! command -v cfssl; then
echo "cfssl is not installed"
echo 'use: bash -c "cd ../../../tools/mod; go install github.com/cloudflare/cfssl/cmd/cfssl"'
exit 255
fi

if ! command -v cfssljson; then
echo "cfssljson is not installed"
echo 'use: bash -c "cd ../../../tools/mod; go install github.com/cloudflare/cfssl/cmd/cfssljson"'
exit 255
fi

Expand Down
2 changes: 2 additions & 0 deletions scripts/test_lib.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/usr/bin/env bash

set -euo pipefail

ROOT_MODULE="go.etcd.io/etcd"

if [[ "$(go list)" != "${ROOT_MODULE}/v3" ]]; then
Expand Down
12 changes: 9 additions & 3 deletions tests/fixtures/gencerts.sh
Original file line number Diff line number Diff line change
@@ -1,15 +1,21 @@
#!/bin/bash

set -e
set -euo pipefail

if ! [[ "$0" =~ "./gencerts.sh" ]]; then
echo "must be run from 'fixtures'"
exit 255
fi

if ! which cfssl; then
if ! command -v cfssl; then
echo "cfssl is not installed"
echo "use: go install -mod mod github.com/cloudflare/cfssl/cmd/cfssl github.com/cloudflare/cfssl/cmd/cfssljson"
echo 'use: bash -c "cd ../../tools/mod; go install github.com/cloudflare/cfssl/cmd/cfssl"'
exit 255
fi

if ! command -v cfssljson; then
echo "cfssljson is not installed"
echo 'use: bash -c "cd ../../tools/mod; go install github.com/cloudflare/cfssl/cmd/cfssljson"'
exit 255
fi

Expand Down
11 changes: 10 additions & 1 deletion tests/integration/fixtures-expired/gencerts.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,21 @@
#!/bin/bash

set -euo pipefail

if ! [[ "$0" =~ "./gencerts.sh" ]]; then
echo "must be run from 'fixtures'"
exit 255
fi

if ! which cfssl; then
if ! command -v cfssl; then
echo "cfssl is not installed"
echo 'use: bash -c "cd ../../../tools/mod; go install github.com/cloudflare/cfssl/cmd/cfssl"'
exit 255
fi

if ! command -v cfssljson; then
echo "cfssljson is not installed"
echo 'use: bash -c "cd ../../../tools/mod; go install github.com/cloudflare/cfssl/cmd/cfssljson"'
exit 255
fi

Expand Down
283 changes: 0 additions & 283 deletions tests/manual/Makefile

This file was deleted.

Loading

0 comments on commit 22f3e50

Please sign in to comment.