Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
f0022d87
Unverified
Commit
f0022d87
authored
Apr 18, 2019
by
Kubernetes Prow Robot
Committed by
GitHub
Apr 18, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #76744 from xichengliudui/fixshellcheckfailures-25
Fix shellcheck failures on test-e2e-node.sh and test-integration.sh
parents
64a0441c
7a39c992
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
16 deletions
+17
-16
.shellcheck_failures
hack/.shellcheck_failures
+0
-2
test-e2e-node.sh
hack/make-rules/test-e2e-node.sh
+10
-10
test-integration.sh
hack/make-rules/test-integration.sh
+7
-4
No files found.
hack/.shellcheck_failures
View file @
f0022d87
...
...
@@ -35,8 +35,6 @@
./hack/make-rules/clean.sh
./hack/make-rules/helpers/cache_go_dirs.sh
./hack/make-rules/make-help.sh
./hack/make-rules/test-e2e-node.sh
./hack/make-rules/test-integration.sh
./hack/make-rules/test.sh
./hack/make-rules/update.sh
./hack/make-rules/verify.sh
...
...
hack/make-rules/test-e2e-node.sh
View file @
f0022d87
...
...
@@ -14,7 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
KUBE_ROOT
=
$(
dirname
"
${
BASH_SOURCE
}
"
)
/../..
KUBE_ROOT
=
$(
dirname
"
${
BASH_SOURCE
[0]
}
"
)
/../..
source
"
${
KUBE_ROOT
}
/hack/lib/init.sh"
focus
=
${
FOCUS
:-
""
}
...
...
@@ -26,7 +26,7 @@ skip=${SKIP-"\[Flaky\]|\[Slow\]|\[Serial\]"}
# Currently, parallelism only affects when REMOTE=true. For local test,
# ginkgo default parallelism (cores - 1) is used.
parallelism
=
${
PARALLELISM
:-
8
}
artifacts
=
${
ARTIFACTS
:-
"/tmp/_artifacts/
`
date
+%y%m%dT%H%M%S
`
"
}
artifacts
=
"
${
ARTIFACTS
:-
"/tmp/_artifacts/
$(
date
+%y%m%dT%H%M%S
)
"
}
"
remote
=
${
REMOTE
:-
"false"
}
runtime
=
${
RUNTIME
:-
"docker"
}
container_runtime_endpoint
=
${
CONTAINER_RUNTIME_ENDPOINT
:-
""
}
...
...
@@ -38,7 +38,7 @@ extra_envs=${EXTRA_ENVS:-}
# Parse the flags to pass to ginkgo
ginkgoflags
=
""
if
[[
${
parallelism
}
>
1
]]
;
then
if
[[
${
parallelism
}
-gt
1
]]
;
then
ginkgoflags
=
"
${
ginkgoflags
}
-nodes=
${
parallelism
}
"
fi
...
...
@@ -57,21 +57,21 @@ fi
# Setup the directory to copy test artifacts (logs, junit.xml, etc) from remote host to local host
if
[
!
-d
"
${
artifacts
}
"
]
;
then
echo
"Creating artifacts directory at
${
artifacts
}
"
mkdir
-p
${
artifacts
}
mkdir
-p
"
${
artifacts
}
"
fi
echo
"Test artifacts will be written to
${
artifacts
}
"
if
[[
${
runtime
}
==
"remote"
]]
;
then
if
[[
!
-z
${
container_runtime_endpoint
}
]]
;
then
if
[[
-n
${
container_runtime_endpoint
}
]]
;
then
test_args
=
"--container-runtime-endpoint=
${
container_runtime_endpoint
}
${
test_args
}
"
fi
if
[[
!
-z
${
image_service_endpoint
}
]]
;
then
if
[[
-n
${
image_service_endpoint
}
]]
;
then
test_args
=
"--image-service-endpoint=
${
image_service_endpoint
}
${
test_args
}
"
fi
fi
if
[
${
remote
}
=
true
]
;
then
if
[
"
${
remote
}
"
=
true
]
;
then
# The following options are only valid in remote run.
images
=
${
IMAGES
:-
""
}
hosts
=
${
HOSTS
:-
""
}
...
...
@@ -85,8 +85,8 @@ if [ ${remote} = true ] ; then
gubernator
=
${
GUBERNATOR
:-
"false"
}
image_config_file
=
${
IMAGE_CONFIG_FILE
:-
""
}
if
[[
${
hosts
}
==
""
&&
${
images
}
==
""
&&
${
image_config_file
}
==
""
]]
;
then
image_project
=
${
IMAGE_PROJECT
:-
"cos-cloud"
}
gci_image
=
$(
gcloud compute images list
--project
${
image_project
}
\
image_project
=
"
${
IMAGE_PROJECT
:-
"cos-cloud"
}
"
gci_image
=
$(
gcloud compute images list
--project
"
${
image_project
}
"
\
--no-standard-images
--filter
=
"name ~ 'cos-beta.*'"
--format
=
"table[no-heading](name)"
)
images
=
${
gci_image
}
metadata
=
"user-data<
${
KUBE_ROOT
}
/test/e2e_node/jenkins/gci-init.yaml,gci-update-strategy=update_disabled"
...
...
@@ -116,7 +116,7 @@ if [ ${remote} = true ] ; then
IFS
=
','
read
-ra
IM
<<<
"
${
images
}
"
images
=
""
for
i
in
"
${
IM
[@]
}
"
;
do
if
[[
$(
gcloud compute instances list
"
${
instance_prefix
}
-
${
i
}
"
|
grep
${
i
})
]]
;
then
if
gcloud compute instances list
"
${
instance_prefix
}
-
${
i
}
"
|
grep
"
${
i
}
"
;
then
if
[[
"
${
hosts
}
"
!=
""
]]
;
then
hosts
=
"
${
hosts
}
,"
fi
...
...
hack/make-rules/test-integration.sh
View file @
f0022d87
...
...
@@ -18,7 +18,7 @@ set -o errexit
set
-o
nounset
set
-o
pipefail
KUBE_ROOT
=
$(
dirname
"
${
BASH_SOURCE
}
"
)
/../..
KUBE_ROOT
=
$(
dirname
"
${
BASH_SOURCE
[0]
}
"
)
/../..
source
"
${
KUBE_ROOT
}
/hack/lib/init.sh"
# Lists of API Versions of each groups that should be tested, groups are
# separated by comma, lists are separated by semicolon. e.g.,
...
...
@@ -40,7 +40,7 @@ KUBE_TEST_VMODULE=${KUBE_TEST_VMODULE:-"garbagecollector*=6,graph_builder*=6"}
kube::test::find_integration_test_dirs
(
)
{
(
cd
${
KUBE_ROOT
}
cd
"
${
KUBE_ROOT
}
"
find
test
/integration/
-name
'*_test.go'
-print0
\
| xargs
-0n1
dirname
|
sed
"s|^|
${
KUBE_GO_PACKAGE
}
/|"
\
|
LC_ALL
=
C
sort
-u
...
...
@@ -67,7 +67,10 @@ runTests() {
kube::etcd::start
kube::log::status
"Running integration test cases"
KUBE_RACE
=
"-race"
# export KUBE_RACE
#
# Enable the Go race detector.
export
KUBE_RACE
=
"-race"
make
-C
"
${
KUBE_ROOT
}
"
test
\
WHAT
=
"
${
WHAT
:-$(
kube::test::find_integration_test_dirs |
paste
-sd
' '
-
)}
"
\
GOFLAGS
=
"
${
GOFLAGS
:-}
"
\
...
...
@@ -94,7 +97,7 @@ checkEtcdOnPath
trap
cleanup EXIT
# Convert the CSV to an array of API versions to test
IFS
=
';'
read
-a
apiVersions
<<<
"
${
KUBE_TEST_API_VERSIONS
}
"
IFS
=
';'
read
-
r
a
apiVersions
<<<
"
${
KUBE_TEST_API_VERSIONS
}
"
for
apiVersion
in
"
${
apiVersions
[@]
}
"
;
do
runTests
"
${
apiVersion
}
"
done
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment