hack: fix mixed tabs/spaces for indentation
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
4e83c90ae8
commit
2cffe9be3d
|
@ -2,26 +2,26 @@
|
||||||
set -eu
|
set -eu
|
||||||
|
|
||||||
swagger generate model -f api/swagger.yaml \
|
swagger generate model -f api/swagger.yaml \
|
||||||
-t api -m types --skip-validator -C api/swagger-gen.yaml \
|
-t api -m types --skip-validator -C api/swagger-gen.yaml \
|
||||||
-n ErrorResponse \
|
-n ErrorResponse \
|
||||||
-n GraphDriverData \
|
-n GraphDriverData \
|
||||||
-n IdResponse \
|
-n IdResponse \
|
||||||
-n ImageDeleteResponseItem \
|
-n ImageDeleteResponseItem \
|
||||||
-n ImageSummary \
|
-n ImageSummary \
|
||||||
-n Plugin -n PluginDevice -n PluginMount -n PluginEnv -n PluginInterfaceType \
|
-n Plugin -n PluginDevice -n PluginMount -n PluginEnv -n PluginInterfaceType \
|
||||||
-n Port \
|
-n Port \
|
||||||
-n ServiceUpdateResponse \
|
-n ServiceUpdateResponse \
|
||||||
-n Volume
|
-n Volume
|
||||||
|
|
||||||
swagger generate operation -f api/swagger.yaml \
|
swagger generate operation -f api/swagger.yaml \
|
||||||
-t api -a types -m types -C api/swagger-gen.yaml \
|
-t api -a types -m types -C api/swagger-gen.yaml \
|
||||||
-T api/templates --skip-responses --skip-parameters --skip-validator \
|
-T api/templates --skip-responses --skip-parameters --skip-validator \
|
||||||
-n Authenticate \
|
-n Authenticate \
|
||||||
-n ContainerChanges \
|
-n ContainerChanges \
|
||||||
-n ContainerCreate \
|
-n ContainerCreate \
|
||||||
-n ContainerTop \
|
-n ContainerTop \
|
||||||
-n ContainerUpdate \
|
-n ContainerUpdate \
|
||||||
-n ContainerWait \
|
-n ContainerWait \
|
||||||
-n ImageHistory \
|
-n ImageHistory \
|
||||||
-n VolumeCreate \
|
-n VolumeCreate \
|
||||||
-n VolumeList
|
-n VolumeList
|
||||||
|
|
|
@ -20,7 +20,7 @@ fi
|
||||||
# This is a temporary hack for split-binary mode. It can be removed once
|
# This is a temporary hack for split-binary mode. It can be removed once
|
||||||
# https://github.com/docker/docker/pull/22134 is merged into docker master
|
# https://github.com/docker/docker/pull/22134 is merged into docker master
|
||||||
if [ "$(go env GOOS)" = 'windows' ]; then
|
if [ "$(go env GOOS)" = 'windows' ]; then
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "$DOCKER_TEST_HOST" ]; then
|
if [ -z "$DOCKER_TEST_HOST" ]; then
|
||||||
|
|
|
@ -3,8 +3,7 @@ set -e
|
||||||
|
|
||||||
# This script exists as backwards compatibility for CI
|
# This script exists as backwards compatibility for CI
|
||||||
(
|
(
|
||||||
|
DEST="${DEST}-daemon"
|
||||||
DEST="${DEST}-daemon"
|
ABS_DEST="${ABS_DEST}-daemon"
|
||||||
ABS_DEST="${ABS_DEST}-daemon"
|
. hack/make/dynbinary-daemon
|
||||||
. hack/make/dynbinary-daemon
|
|
||||||
)
|
)
|
||||||
|
|
|
@ -3,13 +3,13 @@ set -e -o pipefail
|
||||||
|
|
||||||
source hack/validate/.validate
|
source hack/validate/.validate
|
||||||
new_tests=$(
|
new_tests=$(
|
||||||
validate_diff --diff-filter=ACMR --unified=0 -- 'integration/*_test.go' |
|
validate_diff --diff-filter=ACMR --unified=0 -- 'integration/*_test.go' |
|
||||||
grep -E '^(\+func )(.*)(\*testing)' || true
|
grep -E '^(\+func )(.*)(\*testing)' || true
|
||||||
)
|
)
|
||||||
|
|
||||||
if [ -z "$new_tests" ]; then
|
if [ -z "$new_tests" ]; then
|
||||||
echo 'No new tests added to integration.'
|
echo 'No new tests added to integration.'
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo
|
echo
|
||||||
|
@ -18,12 +18,12 @@ echo "$new_tests"
|
||||||
echo "Running stress test for them."
|
echo "Running stress test for them."
|
||||||
|
|
||||||
(
|
(
|
||||||
TESTARRAY=$(echo "$new_tests" | sed 's/+func //' | awk -F'\\(' '{print $1}' | tr '\n' '|')
|
TESTARRAY=$(echo "$new_tests" | sed 's/+func //' | awk -F'\\(' '{print $1}' | tr '\n' '|')
|
||||||
# Note: TEST_REPEAT will make the test suite run 5 times, restarting the daemon
|
# Note: TEST_REPEAT will make the test suite run 5 times, restarting the daemon
|
||||||
# and each test will run 5 times in a row under the same daemon.
|
# and each test will run 5 times in a row under the same daemon.
|
||||||
# This will make a total of 25 runs for each test in TESTARRAY.
|
# This will make a total of 25 runs for each test in TESTARRAY.
|
||||||
export TEST_REPEAT=5
|
export TEST_REPEAT=5
|
||||||
export TESTFLAGS="-test.count ${TEST_REPEAT} -test.run ${TESTARRAY%?}"
|
export TESTFLAGS="-test.count ${TEST_REPEAT} -test.run ${TESTARRAY%?}"
|
||||||
echo "Using test flags: $TESTFLAGS"
|
echo "Using test flags: $TESTFLAGS"
|
||||||
source hack/make/test-integration
|
source hack/make/test-integration
|
||||||
)
|
)
|
||||||
|
|
|
@ -20,9 +20,9 @@ pkg_list=$(go list $TESTDIRS | grep -vE "($exclude_paths)")
|
||||||
|
|
||||||
mkdir -p bundles
|
mkdir -p bundles
|
||||||
gotestsum --format=standard-quiet --jsonfile=bundles/go-test-report.json --junitfile=bundles/junit-report.xml -- \
|
gotestsum --format=standard-quiet --jsonfile=bundles/go-test-report.json --junitfile=bundles/junit-report.xml -- \
|
||||||
"${BUILDFLAGS[@]}" \
|
"${BUILDFLAGS[@]}" \
|
||||||
-cover \
|
-cover \
|
||||||
-coverprofile=bundles/profile.out \
|
-coverprofile=bundles/profile.out \
|
||||||
-covermode=atomic \
|
-covermode=atomic \
|
||||||
${TESTFLAGS} \
|
${TESTFLAGS} \
|
||||||
${pkg_list}
|
${pkg_list}
|
||||||
|
|
|
@ -3,8 +3,8 @@
|
||||||
changelogFile=${1:-CHANGELOG.md}
|
changelogFile=${1:-CHANGELOG.md}
|
||||||
|
|
||||||
if [ ! -r "$changelogFile" ]; then
|
if [ ! -r "$changelogFile" ]; then
|
||||||
echo "Unable to read file $changelogFile" >&2
|
echo "Unable to read file $changelogFile" >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
grep -e '^## ' "$changelogFile" | awk '{print$3}' | sort -c -r || exit 2
|
grep -e '^## ' "$changelogFile" | awk '{print$3}' | sort -c -r || exit 2
|
||||||
|
|
|
@ -3,8 +3,8 @@
|
||||||
changelogFile=${1:-CHANGELOG.md}
|
changelogFile=${1:-CHANGELOG.md}
|
||||||
|
|
||||||
if [ ! -r "$changelogFile" ]; then
|
if [ ! -r "$changelogFile" ]; then
|
||||||
echo "Unable to read file $changelogFile" >&2
|
echo "Unable to read file $changelogFile" >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
changelogWellFormed=1
|
changelogWellFormed=1
|
||||||
|
@ -12,14 +12,14 @@ changelogWellFormed=1
|
||||||
# e.g. "## 1.12.3 (2016-10-26)"
|
# e.g. "## 1.12.3 (2016-10-26)"
|
||||||
VER_LINE_REGEX='^## [0-9]+\.[0-9]+\.[0-9]+(-ce)? \([0-9]+-[0-9]+-[0-9]+\)$'
|
VER_LINE_REGEX='^## [0-9]+\.[0-9]+\.[0-9]+(-ce)? \([0-9]+-[0-9]+-[0-9]+\)$'
|
||||||
while read -r line; do
|
while read -r line; do
|
||||||
if ! [[ "$line" =~ $VER_LINE_REGEX ]]; then
|
if ! [[ "$line" =~ $VER_LINE_REGEX ]]; then
|
||||||
echo "Malformed changelog $changelogFile line \"$line\"" >&2
|
echo "Malformed changelog $changelogFile line \"$line\"" >&2
|
||||||
changelogWellFormed=0
|
changelogWellFormed=0
|
||||||
fi
|
fi
|
||||||
done < <(grep '^## ' $changelogFile)
|
done < <(grep '^## ' $changelogFile)
|
||||||
|
|
||||||
if [[ "$changelogWellFormed" == "1" ]]; then
|
if [[ "$changelogWellFormed" == "1" ]]; then
|
||||||
echo "Congratulations! Changelog $changelogFile is well-formed."
|
echo "Congratulations! Changelog $changelogFile is well-formed."
|
||||||
else
|
else
|
||||||
exit 2
|
exit 2
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -5,13 +5,13 @@ export SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
source "${SCRIPTDIR}/.validate"
|
source "${SCRIPTDIR}/.validate"
|
||||||
|
|
||||||
new_tests=$(
|
new_tests=$(
|
||||||
validate_diff --diff-filter=ACMR --unified=0 -- 'integration-cli/*_cli_*.go' |
|
validate_diff --diff-filter=ACMR --unified=0 -- 'integration-cli/*_cli_*.go' |
|
||||||
grep -E '^\+func (.*) Test' || true
|
grep -E '^\+func (.*) Test' || true
|
||||||
)
|
)
|
||||||
|
|
||||||
if [ -z "$new_tests" ]; then
|
if [ -z "$new_tests" ]; then
|
||||||
echo 'Congratulations! No new tests added to integration-cli.'
|
echo 'Congratulations! No new tests added to integration-cli.'
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "The following new tests were added to integration-cli:"
|
echo "The following new tests were added to integration-cli:"
|
||||||
|
|
|
@ -8,6 +8,6 @@ files=( $(validate_diff --diff-filter=ACMR --name-only -- 'api/swagger.yaml' ||
|
||||||
unset IFS
|
unset IFS
|
||||||
|
|
||||||
if [ ${#files[@]} -gt 0 ]; then
|
if [ ${#files[@]} -gt 0 ]; then
|
||||||
yamllint -c ${SCRIPTDIR}/.swagger-yamllint api/swagger.yaml
|
yamllint -c ${SCRIPTDIR}/.swagger-yamllint api/swagger.yaml
|
||||||
swagger validate api/swagger.yaml
|
swagger validate api/swagger.yaml
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -25,5 +25,5 @@ if [ ${#files[@]} -gt 0 ]; then
|
||||||
echo 'Congratulations! All api changes are done the right way.'
|
echo 'Congratulations! All api changes are done the right way.'
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo 'No api/types/ or api/swagger.yaml changes in diff.'
|
echo 'No api/types/ or api/swagger.yaml changes in diff.'
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue