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
dfbe7be5
Commit
dfbe7be5
authored
Nov 23, 2016
by
Random-Liu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Final cleanup for node conformance test.
parent
8c212e7f
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
25 additions
and
17 deletions
+25
-17
known-flags.txt
hack/verify-flags/known-flags.txt
+0
-1
Dockerfile
test/e2e_node/conformance/build/Dockerfile
+3
-5
Makefile
test/e2e_node/conformance/build/Makefile
+4
-0
run_test.sh
test/e2e_node/conformance/run_test.sh
+14
-10
garbage_collector_test.go
test/e2e_node/garbage_collector_test.go
+4
-1
No files found.
hack/verify-flags/known-flags.txt
View file @
dfbe7be5
...
@@ -351,7 +351,6 @@ long-running-request-regexp
...
@@ -351,7 +351,6 @@ long-running-request-regexp
low-diskspace-threshold-mb
low-diskspace-threshold-mb
make-iptables-util-chains
make-iptables-util-chains
make-symlinks
make-symlinks
manifest-path
manifest-url
manifest-url
manifest-url-header
manifest-url-header
masquerade-all
masquerade-all
...
...
test/e2e_node/conformance/build/Dockerfile
View file @
dfbe7be5
...
@@ -19,17 +19,15 @@ COPY e2e_node.test /usr/local/bin
...
@@ -19,17 +19,15 @@ COPY e2e_node.test /usr/local/bin
# The following environment variables can be override when starting the container.
# The following environment variables can be override when starting the container.
# FOCUS is regex matching test to run. By default run all conformance test.
# FOCUS is regex matching test to run. By default run all conformance test.
# SKIP is regex matching test to skip. By default
empty
.
# SKIP is regex matching test to skip. By default
skip flaky and serial test
.
# PARALLELISM is the number of processes the test will run in parallel.
# PARALLELISM is the number of processes the test will run in parallel.
# REPORT_PATH is the path in the container to save test result and logs.
# REPORT_PATH is the path in the container to save test result and logs.
# MANIFEST_PATH is the kubelet manifest path in the container.
# FLAKE_ATTEMPTS is the time to retry when there is a test failure. By default 2.
# FLAKE_ATTEMPTS is the time to retry when there is a test failure. By default 2.
# TEST_ARGS is the test arguments passed into the test.
# TEST_ARGS is the test arguments passed into the test.
ENV
FOCUS="\[Conformance\]" \
ENV
FOCUS="\[Conformance\]" \
SKIP="\[Flaky\]|\[Serial\]" \
SKIP="\[Flaky\]|\[Serial\]" \
PARALLELISM=8 \
PARALLELISM=8 \
REPORT_PATH="/var/result" \
REPORT_PATH="/var/result" \
MANIFEST_PATH="/etc/manifest" \
FLAKE_ATTEMPTS=2 \
FLAKE_ATTEMPTS=2 \
TEST_ARGS=""
TEST_ARGS=""
...
@@ -40,5 +38,5 @@ ENTRYPOINT ginkgo --focus="$FOCUS" \
...
@@ -40,5 +38,5 @@ ENTRYPOINT ginkgo --focus="$FOCUS" \
/usr/local/bin/e2e_node.test \
/usr/local/bin/e2e_node.test \
-- --conformance=true \
-- --conformance=true \
--prepull-images=false \
--prepull-images=false \
--
manifest-path="$MANIFEST_PATH"
\
--
report-dir="$REPORT_PATH"
\
--report-dir="$REPORT_PATH $TEST_ARGS"
$TEST_ARGS
test/e2e_node/conformance/build/Makefile
View file @
dfbe7be5
...
@@ -56,5 +56,9 @@ endif
...
@@ -56,5 +56,9 @@ endif
push
:
build
push
:
build
gcloud docker push
${
REGISTRY
}
/node-test-
${
ARCH
}
:
${
VERSION
}
gcloud docker push
${
REGISTRY
}
/node-test-
${
ARCH
}
:
${
VERSION
}
ifeq
($(ARCH),amd64)
docker tag ${REGISTRY}/node-test-${ARCH}
:
${VERSION} ${REGISTRY}/node-test:${VERSION}
gcloud docker
--
push
${
REGISTRY
}
/node-test:
${
VERSION
}
endif
.PHONY
:
all
.PHONY
:
all
test/e2e_node/conformance/run_test.sh
View file @
dfbe7be5
...
@@ -23,9 +23,6 @@
...
@@ -23,9 +23,6 @@
# TODO(random-liu): Use standard installer to install kubelet.
# TODO(random-liu): Use standard installer to install kubelet.
# TODO(random-liu): Use standard tool to start kubelet in production way (such
# TODO(random-liu): Use standard tool to start kubelet in production way (such
# as systemd, supervisord etc.)
# as systemd, supervisord etc.)
# TODO(random-liu): Initialize kubelet with standard configmap after dynamic
# configuration landing, so that all test could get the current kubelet
# configuration and react accordingly.
# Refresh sudo credentials if not running on GCE.
# Refresh sudo credentials if not running on GCE.
if
!
ping
-c
1
-q
metadata.google.internal &> /dev/null
;
then
if
!
ping
-c
1
-q
metadata.google.internal &> /dev/null
;
then
...
@@ -42,6 +39,10 @@ FOCUS=${FOCUS:-""}
...
@@ -42,6 +39,10 @@ FOCUS=${FOCUS:-""}
# flaky and serial test.
# flaky and serial test.
SKIP
=
${
SKIP
:-
""
}
SKIP
=
${
SKIP
:-
""
}
# TEST_ARGS is the test arguments. It could be used to override default test
# arguments in the container.
TEST_ARGS
=
${
TEST_ARGS
:-
""
}
# REGISTRY is the image registry for node test image.
# REGISTRY is the image registry for node test image.
REGISTRY
=
${
REGISTRY
:-
"gcr.io/google_containers"
}
REGISTRY
=
${
REGISTRY
:-
"gcr.io/google_containers"
}
...
@@ -50,7 +51,7 @@ REGISTRY=${REGISTRY:-"gcr.io/google_containers"}
...
@@ -50,7 +51,7 @@ REGISTRY=${REGISTRY:-"gcr.io/google_containers"}
ARCH
=
${
ARCH
:-
"amd64"
}
ARCH
=
${
ARCH
:-
"amd64"
}
# VERSION is the version of the test container image.
# VERSION is the version of the test container image.
VERSION
=
${
VERSION
:-
"0.
1
"
}
VERSION
=
${
VERSION
:-
"0.
2
"
}
# KUBELET_BIN is the kubelet binary name. If it is not specified, use the
# KUBELET_BIN is the kubelet binary name. If it is not specified, use the
# default binary name "kubelet".
# default binary name "kubelet".
...
@@ -95,7 +96,7 @@ wait_kubelet() {
...
@@ -95,7 +96,7 @@ wait_kubelet() {
echo
"Kubelet is ready"
echo
"Kubelet is ready"
break
break
fi
fi
if
[
$cur
-eq
$maxRetry
]
;
then
if
[
$cur
-eq
$maxRetry
]
;
then
echo
"Health check exceeds max retry"
echo
"Health check exceeds max retry"
exit
1
exit
1
fi
fi
...
@@ -119,17 +120,20 @@ kill_kubelet() {
...
@@ -119,17 +120,20 @@ kill_kubelet() {
run_test
()
{
run_test
()
{
env
=
""
env
=
""
if
[
!
-z
"
$FOCUS
"
]
;
then
if
[
!
-z
"
$FOCUS
"
]
;
then
env
=
"
$env
-e FOCUS=
$FOCUS
"
env
=
"
$env
-e FOCUS=
\"
$FOCUS
\"
"
fi
fi
if
[
!
-z
"
$SKIP
"
]
;
then
if
[
!
-z
"
$SKIP
"
]
;
then
env
=
"
$env
-e SKIP=
$SKIP
"
env
=
"
$env
-e SKIP=
\"
$SKIP
\"
"
fi
if
[
!
-z
"
$TEST_ARGS
"
]
;
then
env
=
"
$env
-e TEST_ARGS=
\"
$TEST_ARGS
\"
"
fi
fi
# The test assumes that inside the container:
# The test assumes that inside the container:
# * kubelet manifest path is mounted to
/etc/manifest
;
# * kubelet manifest path is mounted to
the same path
;
# * log collect directory is mounted to /var/result;
# * log collect directory is mounted to /var/result;
# * root file system is mounted to /rootfs.
# * root file system is mounted to /rootfs.
sudo
docker run
-it
--rm
--privileged
=
true
--net
=
host
-v
/:/rootfs
\
sudo
sh
-c
"docker run -it --rm --privileged=true --net=host
-v /:/rootfs
\
-v
$config_dir
:
/etc/manifest
-v
$LOG_DIR
:/var/result
$env
$REGISTRY
/node-test-
$ARCH
:
$VERSION
-v
$config_dir
:
$config_dir
-v
$LOG_DIR
:/var/result
${
env
}
$REGISTRY
/node-test-
$ARCH
:
$VERSION
"
}
}
# Check whether kubelet is running. If kubelet is running, tell the user to stop
# Check whether kubelet is running. If kubelet is running, tell the user to stop
...
...
test/e2e_node/garbage_collector_test.go
View file @
dfbe7be5
...
@@ -257,7 +257,10 @@ func containerGCTest(f *framework.Framework, test testRun) {
...
@@ -257,7 +257,10 @@ func containerGCTest(f *framework.Framework, test testRun) {
// Runs containerGCTest using the docker runtime.
// Runs containerGCTest using the docker runtime.
func
dockerContainerGCTest
(
f
*
framework
.
Framework
,
test
testRun
)
{
func
dockerContainerGCTest
(
f
*
framework
.
Framework
,
test
testRun
)
{
runtime
:=
docker
.
ConnectToDockerOrDie
(
defaultDockerEndpoint
,
defaultRuntimeRequestTimeoutDuration
)
var
runtime
docker
.
DockerInterface
BeforeEach
(
func
()
{
runtime
=
docker
.
ConnectToDockerOrDie
(
defaultDockerEndpoint
,
defaultRuntimeRequestTimeoutDuration
)
})
for
_
,
pod
:=
range
test
.
testPods
{
for
_
,
pod
:=
range
test
.
testPods
{
// Initialize the getContainerNames function to use the dockertools api
// Initialize the getContainerNames function to use the dockertools api
thisPrefix
:=
pod
.
containerPrefix
thisPrefix
:=
pod
.
containerPrefix
...
...
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