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
0c32c22b
Unverified
Commit
0c32c22b
authored
Apr 05, 2019
by
Kubernetes Prow Robot
Committed by
GitHub
Apr 05, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #75546 from fabriziopandini/e2e-kubeadm-first-class
Implement make test-e2e-kubeadm
parents
ca1e4706
2cb2a979
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
94 additions
and
0 deletions
+94
-0
Makefile
build/root/Makefile
+30
-0
test-e2e-kubeadm.sh
hack/make-rules/test-e2e-kubeadm.sh
+64
-0
No files found.
build/root/Makefile
View file @
0c32c22b
...
...
@@ -279,6 +279,36 @@ test-e2e-node: ginkgo generated_files
hack/make-rules/test-e2e-node.sh
endif
define
TEST_E2E_KUBEADM_HELP_INFO
# Build and run kubeadm end-to-end tests.
#
# Args:
# FOCUS: Regexp that matches the tests to be run. Defaults to "".
# SKIP: Regexp that matches the tests that needs to be skipped. Defaults
# to "".
# RUN_UNTIL_FAILURE: If true, pass --untilItFails to ginkgo so tests are run
# repeatedly until they fail. Defaults to false.
# ARTIFACTS: Local directory to save test artifacts into. Defaults to "/tmp/_artifacts".
# PARALLELISM: The number of gingko nodes to run. If empty ginkgo default
# parallelism (cores - 1) is used
# BUILD: Build kubeadm end-to-end tests. Defaults to true.
#
# Example:
# make test-e2e-kubeadm
# make test-e2e-kubeadm FOCUS=kubeadm-config
# make test-e2e-kubeadm SKIP=kubeadm-config
#
# Build and run tests.
endef
.PHONY
:
test-e2e-kubeadm
ifeq
($(PRINT_HELP),y)
test-e2e-kubeadm
:
@
echo
"
$$
TEST_E2E_KUBEADM_HELP_INFO"
else
test-e2e-kubeadm
:
hack/make-rules/test-e2e-kubeadm.sh
endif
define
TEST_CMD_HELP_INFO
# Build and run cmdline tests.
#
...
...
hack/make-rules/test-e2e-kubeadm.sh
0 → 100755
View file @
0c32c22b
#!/usr/bin/env bash
# Copyright 2019 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
set
-o
errexit
set
-o
nounset
set
-o
pipefail
KUBE_ROOT
=
$(
dirname
"
${
BASH_SOURCE
[0]
}
"
)
/../..
source
"
${
KUBE_ROOT
}
/hack/lib/init.sh"
focus
=
${
FOCUS
:-
""
}
skip
=
${
SKIP
:-
""
}
parallelism
=
${
PARALLELISM
:-
""
}
artifacts
=
${
ARTIFACTS
:-
"/tmp/_artifacts/
$(
date
+%y%m%dT%H%M%S
)
"
}
run_until_failure
=
${
RUN_UNTIL_FAILURE
:-
"false"
}
build
=
${
BUILD
:-
"true"
}
# Parse the flags to pass to ginkgo
ginkgoflags
=
""
if
[[
${
parallelism
}
!=
""
]]
;
then
ginkgoflags
=
"
${
ginkgoflags
}
-nodes=
${
parallelism
}
"
else
ginkgoflags
=
"
${
ginkgoflags
}
-p "
fi
if
[[
${
focus
}
!=
""
]]
;
then
ginkgoflags
=
"
${
ginkgoflags
}
-focus=
\"
${
focus
}
\"
"
fi
if
[[
${
skip
}
!=
""
]]
;
then
ginkgoflags
=
"
${
ginkgoflags
}
-skip=
\"
${
skip
}
\"
"
fi
if
[[
${
run_until_failure
}
!=
"false"
]]
;
then
ginkgoflags
=
"
${
ginkgoflags
}
-untilItFails=
${
run_until_failure
}
"
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
}
"
fi
echo
"Test artifacts will be written to
${
artifacts
}
"
# Test
kube::golang::verify_go_version
go run
test
/e2e_kubeadm/runner/local/run_local.go
\
--ginkgo-flags
=
"
${
ginkgoflags
}
"
\
--test-flags
=
"--provider=skeleton --report-dir=
${
artifacts
}
"
\
--build
=
"
${
build
}
"
2>&1 |
tee
-i
"
${
artifacts
}
/build-log.txt"
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