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
66b9e9c4
Commit
66b9e9c4
authored
Mar 01, 2021
by
Brad Davidson
Committed by
Brad Davidson
Mar 01, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Suppress test failure due to incompatible server
Signed-off-by:
Brad Davidson
<
brad.davidson@rancher.com
>
parent
4fb073e7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
3 deletions
+23
-3
test-helpers
scripts/test-helpers
+14
-3
test-run-compat
scripts/test-run-compat
+9
-0
No files found.
scripts/test-helpers
View file @
66b9e9c4
...
...
@@ -134,7 +134,7 @@ dump-logs() {
mkdir
-p
$node
/logs
local hostname
=
$(
docker
exec
$name
hostname
)
docker logs
$name
>
$node
/logs/system.log 2>&1
if
[[
$name
==
k3s-
*
]]
;
then
if
[[
!
-z
"
$hostname
"
&&
$name
==
k3s-
*
]]
;
then
docker
exec
$server
kubectl describe node/
$hostname
>
$node
/logs/kubectl-describe-node.txt
docker
cp
$name
:/var/lib/rancher/k3s/agent/containerd/containerd.log
$node
/logs/containerd.log 2>/dev/null
docker
exec
$name
crictl pods
>
$node
/logs/crictl-pods.txt
...
...
@@ -263,12 +263,16 @@ test-cleanup() {
echo
"Removing container
$container
"
docker
rm
-f
-v
$container
done
echo
if
has-function test-post-hook
;
then
test-post-hook
$code
code
=
$?
fi
if
[
"
$TEST_CLEANUP
"
=
true
]
;
then
echo
"Removing test directory
$TEST_DIR
"
rm
-rf
$TEST_DIR
fi
[
-f
"
$PROVISION_LOCK
"
]
&&
rm
$PROVISION_LOCK
echo
echo
-n
"Test
$(
basename
$TEST_DIR
)
"
if
[
$code
-eq
0
]
;
then
echo
"passed."
...
...
@@ -392,8 +396,15 @@ export -f inc-count
# ---
has-function
()
{
[[
!
-z
"
$1
"
&&
$(
type
-t
$1
)
==
"function"
]]
}
2> /dev/null
export
-f
has-function
# ---
run-function
()
{
declare
-f
$1
>
/dev/null 2>&
1
||
return
0
has-function
$
1
||
return
0
$@
}
export
-f
run-function
...
...
scripts/test-run-compat
View file @
66b9e9c4
...
...
@@ -17,6 +17,15 @@ start-test() {
}
export
-f
start-test
# --- suppress test failures if the agent is intentionally incompatible with the server version
test-post-hook
()
{
if
[[
$1
-eq
0
]]
;
then
return
fi
grep
-sqF
'incompatible down-level server detected'
$TEST_DIR
/agents/
*
/logs/system.log
}
export
-f
test-post-hook
REPO
=
${
REPO
:-
rancher
}
IMAGE_NAME
=
${
IMAGE_NAME
:-
k3s
}
PREVIOUS_CHANNEL
=
$(
curl
-s
https://update.k3s.io/v1-release/channels/stable
-o
/dev/null
-w
'%{redirect_url}'
|
awk
-F
.
'{print "v1." ($(NF - 1) - 1)}'
)
...
...
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