1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

hack: fix mixed tabs/spaces for indentation

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2019-08-02 15:58:33 +02:00
parent 4e83c90ae8
commit 2cffe9be3d
No known key found for this signature in database
GPG key ID: 76698F39D527CE8C
10 changed files with 59 additions and 60 deletions

View file

@ -2,26 +2,26 @@
set -eu
swagger generate model -f api/swagger.yaml \
-t api -m types --skip-validator -C api/swagger-gen.yaml \
-n ErrorResponse \
-n GraphDriverData \
-n IdResponse \
-n ImageDeleteResponseItem \
-n ImageSummary \
-n Plugin -n PluginDevice -n PluginMount -n PluginEnv -n PluginInterfaceType \
-n Port \
-n ServiceUpdateResponse \
-n Volume
-t api -m types --skip-validator -C api/swagger-gen.yaml \
-n ErrorResponse \
-n GraphDriverData \
-n IdResponse \
-n ImageDeleteResponseItem \
-n ImageSummary \
-n Plugin -n PluginDevice -n PluginMount -n PluginEnv -n PluginInterfaceType \
-n Port \
-n ServiceUpdateResponse \
-n Volume
swagger generate operation -f api/swagger.yaml \
-t api -a types -m types -C api/swagger-gen.yaml \
-T api/templates --skip-responses --skip-parameters --skip-validator \
-n Authenticate \
-n ContainerChanges \
-n ContainerCreate \
-n ContainerTop \
-n ContainerUpdate \
-n ContainerWait \
-n ImageHistory \
-n VolumeCreate \
-n VolumeList
-t api -a types -m types -C api/swagger-gen.yaml \
-T api/templates --skip-responses --skip-parameters --skip-validator \
-n Authenticate \
-n ContainerChanges \
-n ContainerCreate \
-n ContainerTop \
-n ContainerUpdate \
-n ContainerWait \
-n ImageHistory \
-n VolumeCreate \
-n VolumeList

View file

@ -20,7 +20,7 @@ fi
# 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
if [ "$(go env GOOS)" = 'windows' ]; then
return
return
fi
if [ -z "$DOCKER_TEST_HOST" ]; then

View file

@ -3,8 +3,7 @@ set -e
# This script exists as backwards compatibility for CI
(
DEST="${DEST}-daemon"
ABS_DEST="${ABS_DEST}-daemon"
. hack/make/dynbinary-daemon
DEST="${DEST}-daemon"
ABS_DEST="${ABS_DEST}-daemon"
. hack/make/dynbinary-daemon
)

View file

@ -3,13 +3,13 @@ set -e -o pipefail
source hack/validate/.validate
new_tests=$(
validate_diff --diff-filter=ACMR --unified=0 -- 'integration/*_test.go' |
grep -E '^(\+func )(.*)(\*testing)' || true
validate_diff --diff-filter=ACMR --unified=0 -- 'integration/*_test.go' |
grep -E '^(\+func )(.*)(\*testing)' || true
)
if [ -z "$new_tests" ]; then
echo 'No new tests added to integration.'
return
echo 'No new tests added to integration.'
return
fi
echo
@ -18,12 +18,12 @@ echo "$new_tests"
echo "Running stress test for them."
(
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
# 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.
export TEST_REPEAT=5
export TESTFLAGS="-test.count ${TEST_REPEAT} -test.run ${TESTARRAY%?}"
echo "Using test flags: $TESTFLAGS"
source hack/make/test-integration
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
# 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.
export TEST_REPEAT=5
export TESTFLAGS="-test.count ${TEST_REPEAT} -test.run ${TESTARRAY%?}"
echo "Using test flags: $TESTFLAGS"
source hack/make/test-integration
)

View file

@ -20,9 +20,9 @@ pkg_list=$(go list $TESTDIRS | grep -vE "($exclude_paths)")
mkdir -p bundles
gotestsum --format=standard-quiet --jsonfile=bundles/go-test-report.json --junitfile=bundles/junit-report.xml -- \
"${BUILDFLAGS[@]}" \
-cover \
-coverprofile=bundles/profile.out \
-covermode=atomic \
${TESTFLAGS} \
${pkg_list}
"${BUILDFLAGS[@]}" \
-cover \
-coverprofile=bundles/profile.out \
-covermode=atomic \
${TESTFLAGS} \
${pkg_list}

View file

@ -3,8 +3,8 @@
changelogFile=${1:-CHANGELOG.md}
if [ ! -r "$changelogFile" ]; then
echo "Unable to read file $changelogFile" >&2
exit 1
echo "Unable to read file $changelogFile" >&2
exit 1
fi
grep -e '^## ' "$changelogFile" | awk '{print$3}' | sort -c -r || exit 2

View file

@ -3,8 +3,8 @@
changelogFile=${1:-CHANGELOG.md}
if [ ! -r "$changelogFile" ]; then
echo "Unable to read file $changelogFile" >&2
exit 1
echo "Unable to read file $changelogFile" >&2
exit 1
fi
changelogWellFormed=1
@ -12,14 +12,14 @@ changelogWellFormed=1
# e.g. "## 1.12.3 (2016-10-26)"
VER_LINE_REGEX='^## [0-9]+\.[0-9]+\.[0-9]+(-ce)? \([0-9]+-[0-9]+-[0-9]+\)$'
while read -r line; do
if ! [[ "$line" =~ $VER_LINE_REGEX ]]; then
echo "Malformed changelog $changelogFile line \"$line\"" >&2
changelogWellFormed=0
fi
if ! [[ "$line" =~ $VER_LINE_REGEX ]]; then
echo "Malformed changelog $changelogFile line \"$line\"" >&2
changelogWellFormed=0
fi
done < <(grep '^## ' $changelogFile)
if [[ "$changelogWellFormed" == "1" ]]; then
echo "Congratulations! Changelog $changelogFile is well-formed."
echo "Congratulations! Changelog $changelogFile is well-formed."
else
exit 2
exit 2
fi

View file

@ -5,13 +5,13 @@ export SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
source "${SCRIPTDIR}/.validate"
new_tests=$(
validate_diff --diff-filter=ACMR --unified=0 -- 'integration-cli/*_cli_*.go' |
grep -E '^\+func (.*) Test' || true
validate_diff --diff-filter=ACMR --unified=0 -- 'integration-cli/*_cli_*.go' |
grep -E '^\+func (.*) Test' || true
)
if [ -z "$new_tests" ]; then
echo 'Congratulations! No new tests added to integration-cli.'
exit
exit
fi
echo "The following new tests were added to integration-cli:"

View file

@ -8,6 +8,6 @@ files=( $(validate_diff --diff-filter=ACMR --name-only -- 'api/swagger.yaml' ||
unset IFS
if [ ${#files[@]} -gt 0 ]; then
yamllint -c ${SCRIPTDIR}/.swagger-yamllint api/swagger.yaml
swagger validate api/swagger.yaml
yamllint -c ${SCRIPTDIR}/.swagger-yamllint api/swagger.yaml
swagger validate api/swagger.yaml
fi

View file

@ -25,5 +25,5 @@ if [ ${#files[@]} -gt 0 ]; then
echo 'Congratulations! All api changes are done the right way.'
fi
else
echo 'No api/types/ or api/swagger.yaml changes in diff.'
echo 'No api/types/ or api/swagger.yaml changes in diff.'
fi