Merge pull request #1289 from mrunalp/bump_critools

Bump up cri-tools to f1a58d681c056f259802f5cae2fe1fbcc6b28667
This commit is contained in:
Antonio Murdaca 2018-01-30 20:07:14 +01:00 committed by GitHub
commit 3ab6c36b83
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
18 changed files with 224 additions and 224 deletions

View File

@ -98,7 +98,7 @@ RUN set -x \
&& rm -rf "$GOPATH"
# Install crictl
ENV CRICTL_COMMIT b42fc3f364dd48f649d55926c34492beeb9b2e99
ENV CRICTL_COMMIT f1a58d681c056f259802f5cae2fe1fbcc6b28667
RUN set -x \
&& export GOPATH="$(mktemp -d)" \
&& git clone https://github.com/kubernetes-incubator/cri-tools.git "$GOPATH/src/github.com/kubernetes-incubator/cri-tools" \

View File

@ -58,7 +58,7 @@
include: "build/cri-tools.yml"
vars:
force_clone: True
cri_tools_git_version: "a9e38a4a000bc1a4052fb33de1c967b8cfe9ad40"
cri_tools_git_version: "f1a58d681c056f259802f5cae2fe1fbcc6b28667"
- name: run cri-o integration tests
include: test.yml
@ -77,7 +77,7 @@
include: "build/cri-tools.yml"
vars:
force_clone: True
cri_tools_git_version: "a9e38a4a000bc1a4052fb33de1c967b8cfe9ad40"
cri_tools_git_version: "f1a58d681c056f259802f5cae2fe1fbcc6b28667"
- name: run critest validation and benchmarks
include: critest.yml

View File

@ -19,7 +19,7 @@ function teardown() {
sed -e 's/%VALUE%/,"container\.apparmor\.security\.beta\.kubernetes\.io\/testname1": "runtime\/default"/g' "$TESTDATA"/sandbox_config_seccomp.json > "$TESTDIR"/apparmor1.json
run crictl runs "$TESTDIR"/apparmor1.json
run crictl runp "$TESTDIR"/apparmor1.json
echo "$output"
[ "$status" -eq 0 ]
pod_id="$output"
@ -50,7 +50,7 @@ function teardown() {
sed -e 's/%VALUE%/,"container\.apparmor\.security\.beta\.kubernetes\.io\/testname2": "apparmor-test-deny-write"/g' "$TESTDATA"/sandbox_config_seccomp.json > "$TESTDIR"/apparmor2.json
run crictl runs "$TESTDIR"/apparmor2.json
run crictl runp "$TESTDIR"/apparmor2.json
echo "$output"
[ "$status" -eq 0 ]
pod_id="$output"
@ -83,7 +83,7 @@ function teardown() {
sed -e 's/%VALUE%/,"container\.apparmor\.security\.beta\.kubernetes\.io\/testname3": "apparmor-test-deny-write"/g' "$TESTDATA"/sandbox_config_seccomp.json > "$TESTDIR"/apparmor3.json
run crictl runs "$TESTDIR"/apparmor3.json
run crictl runp "$TESTDIR"/apparmor3.json
echo "$output"
[ "$status" -eq 0 ]
pod_id="$output"
@ -115,7 +115,7 @@ function teardown() {
sed -e 's/%VALUE%/,"container\.apparmor\.security\.beta\.kubernetes\.io\/testname4": "not-exists"/g' "$TESTDATA"/sandbox_config_seccomp.json > "$TESTDIR"/apparmor4.json
run crictl runs "$TESTDIR"/apparmor4.json
run crictl runp "$TESTDIR"/apparmor4.json
echo "$output"
[ "$status" -eq 0 ]
pod_id="$output"
@ -143,7 +143,7 @@ function teardown() {
sed -e 's/%VALUE%/,"container\.apparmor\.security\.beta\.kubernetes\.io\/testname5": "runtime\/default"/g' "$TESTDATA"/sandbox_config_seccomp.json > "$TESTDIR"/apparmor5.json
run crictl runs "$TESTDIR"/apparmor5.json
run crictl runp "$TESTDIR"/apparmor5.json
echo "$output"
[ "$status" -eq 0 ]
pod_id="$output"

View File

@ -11,7 +11,7 @@ function teardown() {
skip "pids cgroup controller is not mounted"
fi
PIDS_LIMIT=1234 start_crio
run crictl runs "$TESTDATA"/sandbox_config.json
run crictl runp "$TESTDATA"/sandbox_config.json
echo "$output"
[ "$status" -eq 0 ]
pod_id="$output"
@ -28,10 +28,10 @@ function teardown() {
echo "$output"
[ "$status" -eq 0 ]
[[ "$output" =~ "1234" ]]
run crictl stops "$pod_id"
run crictl stopp "$pod_id"
echo "$output"
[ "$status" -eq 0 ]
run crictl rms "$pod_id"
run crictl rmp "$pod_id"
echo "$output"
[ "$status" -eq 0 ]
cleanup_ctrs

View File

@ -17,7 +17,7 @@ function teardown() {
@test "ctr termination reason Completed" {
start_crio
run crictl runs "$TESTDATA"/sandbox_config.json
run crictl runp "$TESTDATA"/sandbox_config.json
echo "$output"
[ "$status" -eq 0 ]
pod_id="$output"
@ -41,7 +41,7 @@ function teardown() {
@test "ctr termination reason Error" {
start_crio
run crictl runs "$TESTDATA"/sandbox_config.json
run crictl runp "$TESTDATA"/sandbox_config.json
echo "$output"
[ "$status" -eq 0 ]
pod_id="$output"
@ -67,7 +67,7 @@ function teardown() {
@test "ctr remove" {
start_crio
run crictl runs "$TESTDATA"/sandbox_config.json
run crictl runp "$TESTDATA"/sandbox_config.json
echo "$output"
[ "$status" -eq 0 ]
pod_id="$output"
@ -81,10 +81,10 @@ function teardown() {
run crictl rm "$ctr_id"
echo "$output"
[ "$status" -eq 0 ]
run crictl stops "$pod_id"
run crictl stopp "$pod_id"
echo "$output"
[ "$status" -eq 0 ]
run crictl rms "$pod_id"
run crictl rmp "$pod_id"
echo "$output"
[ "$status" -eq 0 ]
cleanup_ctrs
@ -94,11 +94,11 @@ function teardown() {
@test "ctr lifecycle" {
start_crio
run crictl runs "$TESTDATA"/sandbox_config.json
run crictl runp "$TESTDATA"/sandbox_config.json
echo "$output"
[ "$status" -eq 0 ]
pod_id="$output"
run crictl sandboxes --quiet
run crictl pods --quiet
echo "$output"
[ "$status" -eq 0 ]
[[ "$output" == "$pod_id" ]]
@ -106,7 +106,7 @@ function teardown() {
echo "$output"
[ "$status" -eq 0 ]
ctr_id="$output"
run crictl ps --quiet
run crictl ps --quiet --state created
echo "$output"
[ "$status" -eq 0 ]
[[ "$output" == "$ctr_id" ]]
@ -119,7 +119,7 @@ function teardown() {
run crictl inspect "$ctr_id"
echo "$output"
[ "$status" -eq 0 ]
run crictl ps --quiet
run crictl ps --quiet --state running
echo "$output"
[ "$status" -eq 0 ]
[[ "$output" == "$ctr_id" ]]
@ -129,7 +129,7 @@ function teardown() {
run crictl inspect "$ctr_id"
echo "$output"
[ "$status" -eq 0 ]
run crictl ps --quiet
run crictl ps --quiet --state stopped
echo "$output"
[ "$status" -eq 0 ]
[[ "$output" == "$ctr_id" ]]
@ -139,10 +139,10 @@ function teardown() {
run crictl ps --quiet
echo "$output"
[ "$status" -eq 0 ]
run crictl stops "$pod_id"
run crictl stopp "$pod_id"
echo "$output"
[ "$status" -eq 0 ]
run crictl sandboxes --quiet
run crictl pods --quiet
echo "$output"
[ "$status" -eq 0 ]
[[ "$output" == "$pod_id" ]]
@ -150,10 +150,10 @@ function teardown() {
echo "$output"
[ "$status" -eq 0 ]
[[ "$output" == "" ]]
run crictl rms "$pod_id"
run crictl rmp "$pod_id"
echo "$output"
[ "$status" -eq 0 ]
run crictl sandboxes --quiet
run crictl pods --quiet
echo "$output"
[ "$status" -eq 0 ]
[[ "$output" == "" ]]
@ -164,7 +164,7 @@ function teardown() {
@test "ctr logging" {
start_crio
run crictl runs "$TESTDATA"/sandbox_config.json
run crictl runp "$TESTDATA"/sandbox_config.json
echo "$output"
[ "$status" -eq 0 ]
pod_id="$output"
@ -196,10 +196,10 @@ function teardown() {
grep -E "^[^\n]+ stdout F here is some output$" "$logpath"
grep -E "^[^\n]+ stderr F and some from stderr$" "$logpath"
run crictl stops "$pod_id"
run crictl stopp "$pod_id"
echo "$output"
[ "$status" -eq 0 ]
run crictl rms "$pod_id"
run crictl rmp "$pod_id"
echo "$output"
[ "$status" -eq 0 ]
@ -210,7 +210,7 @@ function teardown() {
@test "ctr logging [tty=true]" {
start_crio
run crictl runs "$TESTDATA"/sandbox_config.json
run crictl runp "$TESTDATA"/sandbox_config.json
echo "$output"
[ "$status" -eq 0 ]
pod_id="$output"
@ -242,10 +242,10 @@ function teardown() {
echo "$logpath :: $(cat "$logpath")"
grep --binary -P "^[^\n]+ stdout F here is some output\x0d$" "$logpath"
run crictl stops "$pod_id"
run crictl stopp "$pod_id"
echo "$output"
[ "$status" -eq 0 ]
run crictl rms "$pod_id"
run crictl rmp "$pod_id"
echo "$output"
[ "$status" -eq 0 ]
@ -256,7 +256,7 @@ function teardown() {
@test "ctr log max" {
LOG_SIZE_MAX_LIMIT=10000 start_crio
run crictl runs "$TESTDATA"/sandbox_config.json
run crictl runp "$TESTDATA"/sandbox_config.json
echo "$output"
[ "$status" -eq 0 ]
pod_id="$output"
@ -286,10 +286,10 @@ function teardown() {
len=$(wc -l "$logpath" | awk '{print $1}')
[ $len -lt 250 ]
run crictl stops "$pod_id"
run crictl stopp "$pod_id"
echo "$output"
[ "$status" -eq 0 ]
run crictl rms "$pod_id"
run crictl rmp "$pod_id"
echo "$output"
[ "$status" -eq 0 ]
@ -300,7 +300,7 @@ function teardown() {
@test "ctr partial line logging" {
start_crio
run crictl runs "$TESTDATA"/sandbox_config.json
run crictl runp "$TESTDATA"/sandbox_config.json
echo "$output"
[ "$status" -eq 0 ]
pod_id="$output"
@ -331,10 +331,10 @@ function teardown() {
echo "$logpath :: $(cat "$logpath")"
grep -E "^[^\n]+ stdout P hello$" "$logpath"
run crictl stops "$pod_id"
run crictl stopp "$pod_id"
echo "$output"
[ "$status" -eq 0 ]
run crictl rms "$pod_id"
run crictl rmp "$pod_id"
echo "$output"
[ "$status" -eq 0 ]
@ -346,7 +346,7 @@ function teardown() {
# regression test for #127
@test "ctrs status for a pod" {
start_crio
run crictl runs "$TESTDATA"/sandbox_config.json
run crictl runp "$TESTDATA"/sandbox_config.json
echo "$output"
[ "$status" -eq 0 ]
pod_id="$output"
@ -355,7 +355,7 @@ function teardown() {
[ "$status" -eq 0 ]
ctr_id="$output"
run crictl ps --quiet
run crictl ps --quiet --state created
echo "$output"
[ "$status" -eq 0 ]
[[ "$output" != "" ]]
@ -379,7 +379,7 @@ function teardown() {
# pod2 ctr2 create
# pod3 ctr3 create & start & stop
start_crio
run crictl runs "$TESTDATA"/sandbox1_config.json
run crictl runp "$TESTDATA"/sandbox1_config.json
echo "$output"
[ "$status" -eq 0 ]
pod1_id="$output"
@ -390,7 +390,7 @@ function teardown() {
run crictl start "$ctr1_id"
echo "$output"
[ "$status" -eq 0 ]
run crictl runs "$TESTDATA"/sandbox2_config.json
run crictl runp "$TESTDATA"/sandbox2_config.json
echo "$output"
[ "$status" -eq 0 ]
pod2_id="$output"
@ -398,7 +398,7 @@ function teardown() {
echo "$output"
[ "$status" -eq 0 ]
ctr2_id="$output"
run crictl runs "$TESTDATA"/sandbox3_config.json
run crictl runp "$TESTDATA"/sandbox3_config.json
echo "$output"
[ "$status" -eq 0 ]
pod3_id="$output"
@ -413,19 +413,19 @@ function teardown() {
echo "$output"
[ "$status" -eq 0 ]
run crictl ps --id "$ctr1_id" --quiet
run crictl ps --id "$ctr1_id" --quiet --all
echo "$output"
[ "$status" -eq 0 ]
[[ "$output" == "$ctr1_id" ]]
run crictl ps --id "${ctr1_id:0:4}" --quiet
run crictl ps --id "${ctr1_id:0:4}" --quiet --all
echo "$output"
[ "$status" -eq 0 ]
[[ "$output" == "$ctr1_id" ]]
run crictl ps --id "$ctr2_id" --sandbox "$pod2_id" --quiet
run crictl ps --id "$ctr2_id" --podsandbox "$pod2_id" --quiet --all
echo "$output"
[ "$status" -eq 0 ]
[[ "$output" == "$ctr2_id" ]]
run crictl ps --id "$ctr2_id" --sandbox "$pod3_id" --quiet
run crictl ps --id "$ctr2_id" --podsandbox "$pod3_id" --quiet --all
echo "$output"
[ "$status" -eq 0 ]
[[ "$output" == "" ]]
@ -441,34 +441,34 @@ function teardown() {
echo "$output"
[ "$status" -eq 0 ]
[[ "$output" == "$ctr3_id" ]]
run crictl ps --sandbox "$pod1_id" --quiet
run crictl ps --podsandbox "$pod1_id" --quiet --all
echo "$output"
[ "$status" -eq 0 ]
[[ "$output" == "$ctr1_id" ]]
run crictl ps --sandbox "$pod2_id" --quiet
run crictl ps --podsandbox "$pod2_id" --quiet --all
echo "$output"
[ "$status" -eq 0 ]
[[ "$output" == "$ctr2_id" ]]
run crictl ps --sandbox "$pod3_id" --quiet
run crictl ps --podsandbox "$pod3_id" --quiet --all
echo "$output"
[ "$status" -eq 0 ]
[[ "$output" == "$ctr3_id" ]]
run crictl stops "$pod1_id"
run crictl stopp "$pod1_id"
echo "$output"
[ "$status" -eq 0 ]
run crictl rms "$pod1_id"
run crictl rmp "$pod1_id"
echo "$output"
[ "$status" -eq 0 ]
run crictl stops "$pod2_id"
run crictl stopp "$pod2_id"
echo "$output"
[ "$status" -eq 0 ]
run crictl rms "$pod2_id"
run crictl rmp "$pod2_id"
echo "$output"
[ "$status" -eq 0 ]
run crictl stops "$pod3_id"
run crictl stopp "$pod3_id"
echo "$output"
[ "$status" -eq 0 ]
run crictl rms "$pod3_id"
run crictl rmp "$pod3_id"
echo "$output"
[ "$status" -eq 0 ]
cleanup_ctrs
@ -483,7 +483,7 @@ function teardown() {
# ctr3 with labels: group=test container=redis version=v1.1.0
start_crio
run crictl runs "$TESTDATA"/sandbox_config.json
run crictl runp "$TESTDATA"/sandbox_config.json
echo "$output"
[ "$status" -eq 0 ]
pod_id="$output"
@ -509,32 +509,32 @@ function teardown() {
[ "$status" -eq 0 ]
ctr3_id="$output"
run crictl ps --label "group=test" --label "name=ctr1" --label "version=v1.0.0" --quiet
run crictl ps --label "group=test" --label "name=ctr1" --label "version=v1.0.0" --quiet --all
echo "$output"
[ "$status" -eq 0 ]
[[ "$output" == "$ctr1_id" ]]
run crictl ps --label "group=production" --quiet
run crictl ps --label "group=production" --quiet --all
echo "$output"
[ "$status" -eq 0 ]
[[ "$output" == "" ]]
run crictl ps --label "group=test" --label "version=v1.0.0" --quiet
run crictl ps --label "group=test" --label "version=v1.0.0" --quiet --all
echo "$output"
[ "$status" -eq 0 ]
[[ "$output" != "" ]]
[[ "$output" =~ "$ctr1_id" ]]
[[ "$output" =~ "$ctr2_id" ]]
[[ "$output" != "$ctr3_id" ]]
run crictl ps --label "group=test" --quiet
run crictl ps --label "group=test" --quiet --all
echo "$output"
[ "$status" -eq 0 ]
[[ "$output" != "" ]]
[[ "$output" =~ "$ctr1_id" ]]
[[ "$output" =~ "$ctr2_id" ]]
[[ "$output" =~ "$ctr3_id" ]]
run crictl stops "$pod_id"
run crictl stopp "$pod_id"
echo "$output"
[ "$status" -eq 0 ]
run crictl rms "$pod_id"
run crictl rmp "$pod_id"
echo "$output"
[ "$status" -eq 0 ]
cleanup_ctrs
@ -544,7 +544,7 @@ function teardown() {
@test "ctr metadata in list & status" {
start_crio
run crictl runs "$TESTDATA"/sandbox_config.json
run crictl runp "$TESTDATA"/sandbox_config.json
echo "$output"
[ "$status" -eq 0 ]
pod_id="$output"
@ -553,14 +553,14 @@ function teardown() {
[ "$status" -eq 0 ]
ctr_id="$output"
run crictl ps --id "$ctr_id" --output yaml
run crictl ps --id "$ctr_id" --output yaml --state created
echo "$output"
[ "$status" -eq 0 ]
# TODO: expected value should not hard coded here
[[ "$output" =~ "name: container1" ]]
[[ "$output" =~ "attempt: 1" ]]
run crictl inspect "$ctr_id"
run crictl inspect "$ctr_id" --output table
echo "$output"
[ "$status" -eq 0 ]
# TODO: expected value should not hard coded here
@ -574,7 +574,7 @@ function teardown() {
@test "ctr execsync conflicting with conmon flags parsing" {
start_crio
run crictl runs "$TESTDATA"/sandbox_config.json
run crictl runp "$TESTDATA"/sandbox_config.json
echo "$output"
[ "$status" -eq 0 ]
pod_id="$output"
@ -596,7 +596,7 @@ function teardown() {
@test "ctr execsync" {
start_crio
run crictl runs "$TESTDATA"/sandbox_config.json
run crictl runp "$TESTDATA"/sandbox_config.json
echo "$output"
[ "$status" -eq 0 ]
pod_id="$output"
@ -615,10 +615,10 @@ function teardown() {
echo "$output"
[[ "$output" =~ "command timed out" ]]
[ "$status" -ne 0 ]
run crictl stops "$pod_id"
run crictl stopp "$pod_id"
echo "$output"
[ "$status" -eq 0 ]
run crictl rms "$pod_id"
run crictl rmp "$pod_id"
echo "$output"
[ "$status" -eq 0 ]
cleanup_ctrs
@ -628,7 +628,7 @@ function teardown() {
@test "ctr device add" {
start_crio
run crictl runs "$TESTDATA"/sandbox_config.json
run crictl runp "$TESTDATA"/sandbox_config.json
echo "$output"
[ "$status" -eq 0 ]
pod_id="$output"
@ -643,10 +643,10 @@ function teardown() {
echo "$output"
[ "$status" -eq 0 ]
[[ "$output" =~ "/dev/mynull" ]]
run crictl stops "$pod_id"
run crictl stopp "$pod_id"
echo "$output"
[ "$status" -eq 0 ]
run crictl rms "$pod_id"
run crictl rmp "$pod_id"
echo "$output"
[ "$status" -eq 0 ]
cleanup_ctrs
@ -656,7 +656,7 @@ function teardown() {
@test "ctr hostname env" {
start_crio
run crictl runs "$TESTDATA"/sandbox_config.json
run crictl runp "$TESTDATA"/sandbox_config.json
echo "$output"
[ "$status" -eq 0 ]
pod_id="$output"
@ -668,10 +668,10 @@ function teardown() {
echo "$output"
[ "$status" -eq 0 ]
[[ "$output" =~ "HOSTNAME" ]]
run crictl stops "$pod_id"
run crictl stopp "$pod_id"
echo "$output"
[ "$status" -eq 0 ]
run crictl rms "$pod_id"
run crictl rmp "$pod_id"
echo "$output"
[ "$status" -eq 0 ]
cleanup_ctrs
@ -681,7 +681,7 @@ function teardown() {
@test "ctr execsync failure" {
start_crio
run crictl runs "$TESTDATA"/sandbox_config.json
run crictl runp "$TESTDATA"/sandbox_config.json
echo "$output"
[ "$status" -eq 0 ]
pod_id="$output"
@ -703,7 +703,7 @@ function teardown() {
@test "ctr execsync exit code" {
start_crio
run crictl runs "$TESTDATA"/sandbox_config.json
run crictl runp "$TESTDATA"/sandbox_config.json
echo "$output"
[ "$status" -eq 0 ]
pod_id="$output"
@ -725,7 +725,7 @@ function teardown() {
@test "ctr execsync std{out,err}" {
start_crio
run crictl runs "$TESTDATA"/sandbox_config.json
run crictl runp "$TESTDATA"/sandbox_config.json
echo "$output"
[ "$status" -eq 0 ]
pod_id="$output"
@ -754,10 +754,10 @@ function teardown() {
echo "$output"
[ "$status" -eq 0 ]
[[ "$output" =~ "this goes to stderr" ]]
run crictl stops "$pod_id"
run crictl stopp "$pod_id"
echo "$output"
[ "$status" -eq 0 ]
run crictl rms "$pod_id"
run crictl rmp "$pod_id"
echo "$output"
[ "$status" -eq 0 ]
cleanup_ctrs
@ -767,7 +767,7 @@ function teardown() {
@test "ctr stop idempotent" {
start_crio
run crictl runs "$TESTDATA"/sandbox_config.json
run crictl runp "$TESTDATA"/sandbox_config.json
echo "$output"
[ "$status" -eq 0 ]
pod_id="$output"
@ -792,7 +792,7 @@ function teardown() {
@test "ctr caps drop" {
start_crio
run crictl runs "$TESTDATA"/sandbox_config.json
run crictl runp "$TESTDATA"/sandbox_config.json
echo "$output"
[ "$status" -eq 0 ]
pod_id="$output"
@ -812,7 +812,7 @@ function teardown() {
run crictl pull gcr.io/k8s-testimages/redis:e2e
echo "$output"
[ "$status" -eq 0 ]
run crictl runs "$TESTDATA"/sandbox_config.json
run crictl runp "$TESTDATA"/sandbox_config.json
echo "$output"
[ "$status" -eq 0 ]
pod_id="$output"
@ -832,7 +832,7 @@ function teardown() {
skip "travis container tests don't support testing OOM"
fi
start_crio
run crictl runs "$TESTDATA"/sandbox_config.json
run crictl runp "$TESTDATA"/sandbox_config.json
echo "$output"
[ "$status" -eq 0 ]
pod_id="$output"
@ -858,10 +858,10 @@ function teardown() {
sleep 10
done
[[ "$output" =~ "OOMKilled" ]]
run crictl stops "$pod_id"
run crictl stopp "$pod_id"
echo "$output"
[ "$status" -eq 0 ]
run crictl rms "$pod_id"
run crictl rmp "$pod_id"
echo "$output"
[ "$status" -eq 0 ]
cleanup_ctrs
@ -871,7 +871,7 @@ function teardown() {
@test "ctr /etc/resolv.conf rw/ro mode" {
start_crio
run crictl runs "$TESTDATA"/sandbox_config.json
run crictl runp "$TESTDATA"/sandbox_config.json
echo "$output"
[ "$status" -eq 0 ]
pod_id="$output"
@ -882,7 +882,7 @@ function teardown() {
run crictl start "$ctr_id"
echo "$output"
[ "$status" -eq 0 ]
run crictl inspect "$ctr_id"
run crictl inspect "$ctr_id" --output table
echo "$output"
[ "$status" -eq 0 ]
[[ "$output" =~ "State: CONTAINER_EXITED" ]]
@ -895,7 +895,7 @@ function teardown() {
run crictl start "$ctr_id"
echo "$output"
[ "$status" -eq 0 ]
run crictl inspect "$ctr_id"
run crictl inspect "$ctr_id" --output table
echo "$output"
[ "$status" -eq 0 ]
[[ "$output" =~ "State: CONTAINER_EXITED" ]]
@ -907,7 +907,7 @@ function teardown() {
@test "ctr create with non-existent command" {
start_crio
run crictl runs "$TESTDATA"/sandbox_config.json
run crictl runp "$TESTDATA"/sandbox_config.json
echo "$output"
[ "$status" -eq 0 ]
pod_id="$output"
@ -916,10 +916,10 @@ function teardown() {
run crictl create "$pod_id" "$TESTDIR"/container_nonexistent.json "$TESTDATA"/sandbox_config.json
[ "$status" -ne 0 ]
[[ "$output" =~ "executable file not found" ]]
run crictl stops "$pod_id"
run crictl stopp "$pod_id"
echo "$output"
[ "$status" -eq 0 ]
run crictl rms "$pod_id"
run crictl rmp "$pod_id"
echo "$output"
[ "$status" -eq 0 ]
cleanup_ctrs
@ -929,7 +929,7 @@ function teardown() {
@test "ctr create with non-existent command [tty]" {
start_crio
run crictl runs "$TESTDATA"/sandbox_config.json
run crictl runp "$TESTDATA"/sandbox_config.json
echo "$output"
[ "$status" -eq 0 ]
pod_id="$output"
@ -938,10 +938,10 @@ function teardown() {
run crictl create "$pod_id" "$TESTDIR"/container_nonexistent.json "$TESTDATA"/sandbox_config.json
[ "$status" -ne 0 ]
[[ "$output" =~ "executable file not found" ]]
run crictl stops "$pod_id"
run crictl stopp "$pod_id"
echo "$output"
[ "$status" -eq 0 ]
run crictl rms "$pod_id"
run crictl rmp "$pod_id"
echo "$output"
[ "$status" -eq 0 ]
cleanup_ctrs
@ -951,7 +951,7 @@ function teardown() {
@test "ctr update resources" {
start_crio
run crictl runs "$TESTDATA"/sandbox_config.json
run crictl runp "$TESTDATA"/sandbox_config.json
echo "$output"
[ "$status" -eq 0 ]
pod_id="$output"
@ -1008,7 +1008,7 @@ function teardown() {
@test "ctr correctly setup working directory" {
start_crio
run crictl runs "$TESTDATA"/sandbox_config.json
run crictl runp "$TESTDATA"/sandbox_config.json
echo "$output"
[ "$status" -eq 0 ]
pod_id="$output"
@ -1037,7 +1037,7 @@ function teardown() {
@test "ctr execsync conflicting with conmon env" {
start_crio
run crictl runs "$TESTDATA"/sandbox_config.json
run crictl runp "$TESTDATA"/sandbox_config.json
echo "$output"
[ "$status" -eq 0 ]
pod_id="$output"
@ -1064,7 +1064,7 @@ function teardown() {
@test "ctr resources" {
start_crio
run crictl runs "$TESTDATA"/sandbox_config.json
run crictl runp "$TESTDATA"/sandbox_config.json
echo "$output"
[ "$status" -eq 0 ]
pod_id="$output"

View File

@ -22,7 +22,7 @@ function teardown() {
start_crio "$TESTDIR"/seccomp_profile1.json
sed -e 's/%VALUE%/unconfined/g' "$TESTDATA"/container_config_seccomp.json > "$TESTDIR"/seccomp1.json
run crictl runs "$TESTDATA"/sandbox_config.json
run crictl runp "$TESTDATA"/sandbox_config.json
echo "$output"
[ "$status" -eq 0 ]
pod_id="$output"
@ -58,7 +58,7 @@ function teardown() {
start_crio "$TESTDIR"/seccomp_profile1.json
sed -e 's/%VALUE%/runtime\/default/g' "$TESTDATA"/container_config_seccomp.json > "$TESTDIR"/seccomp2.json
run crictl runs "$TESTDATA"/sandbox_config.json
run crictl runp "$TESTDATA"/sandbox_config.json
echo "$output"
[ "$status" -eq 0 ]
pod_id="$output"
@ -96,7 +96,7 @@ function teardown() {
start_crio "$TESTDIR"/seccomp_profile1.json
sed -e 's/%VALUE%//g' "$TESTDATA"/container_config_seccomp.json > "$TESTDIR"/seccomp1.json
run crictl runs "$TESTDATA"/sandbox_config.json
run crictl runp "$TESTDATA"/sandbox_config.json
echo "$output"
[ "$status" -eq 0 ]
pod_id="$output"
@ -131,7 +131,7 @@ function teardown() {
start_crio "$TESTDIR"/seccomp_profile1.json
sed -e 's/%VALUE%/wontwork/g' "$TESTDATA"/container_config_seccomp.json > "$TESTDIR"/seccomp1.json
run crictl runs "$TESTDATA"/sandbox_config.json
run crictl runp "$TESTDATA"/sandbox_config.json
echo "$output"
[ "$status" -eq 0 ]
pod_id="$output"
@ -161,7 +161,7 @@ function teardown() {
sed -i 's/"fchmodat",//g' "$TESTDIR"/seccomp_profile1.json
sed -e 's@%VALUE%@localhost/'"$TESTDIR"'/seccomp_profile1.json@g' "$TESTDATA"/container_config_seccomp.json > "$TESTDIR"/seccomp1.json
run crictl runs "$TESTDATA"/sandbox_config.json
run crictl runp "$TESTDATA"/sandbox_config.json
echo "$output"
[ "$status" -eq 0 ]
pod_id="$output"
@ -198,7 +198,7 @@ function teardown() {
start_crio "$TESTDIR"/seccomp_profile1.json
sed -e 's/%VALUE%/docker\/default/g' "$TESTDATA"/container_config_seccomp.json > "$TESTDIR"/seccomp2.json
run crictl runs "$TESTDATA"/sandbox_config.json
run crictl runp "$TESTDATA"/sandbox_config.json
echo "$output"
[ "$status" -eq 0 ]
pod_id="$output"

View File

@ -10,7 +10,7 @@ function teardown() {
@test "bind secrets mounts to container" {
start_crio
run crictl runs "$TESTDATA"/sandbox_config.json
run crictl runp "$TESTDATA"/sandbox_config.json
echo "$output"
[ "$status" -eq 0 ]
pod_id="$output"
@ -34,7 +34,7 @@ function teardown() {
@test "default mounts correctly sorted with other mounts" {
start_crio
run crictl runs "$TESTDATA"/sandbox_config.json
run crictl runp "$TESTDATA"/sandbox_config.json
echo "$output"
[ "$status" -eq 0 ]
pod_id="$output"

View File

@ -234,8 +234,8 @@ function start_crio() {
if [ "$status" -ne 0 ] ; then
crictl pull redis:alpine
fi
REDIS_IMAGEID=$(crictl inspecti redis:alpine | grep ^ID: | head -n 1 | sed -e "s/ID: //g")
REDIS_IMAGEREF=$(crictl inspecti redis:alpine | grep ^Digest: | head -n 1 | sed -e "s/Digest: //g")
REDIS_IMAGEID=$(crictl inspecti redis:alpine --output table | grep ^ID: | head -n 1 | sed -e "s/ID: //g")
REDIS_IMAGEREF=$(crictl inspecti redis:alpine --output table | grep ^Digest: | head -n 1 | sed -e "s/Digest: //g")
run crictl inspecti mrunalp/oom
if [ "$status" -ne 0 ] ; then
crictl pull mrunalp/oom
@ -285,13 +285,13 @@ function cleanup_images() {
}
function cleanup_pods() {
output=$(crictl sandboxes --quiet)
output=$(crictl pods --quiet)
if [ $? -eq 0 ]; then
if [ "$output" != "" ]; then
printf '%s\n' "$output" | while IFS= read -r line
do
crictl stops "$line"
crictl rms "$line"
crictl stopp "$line"
crictl rmp "$line"
done
fi
fi

View File

@ -12,7 +12,7 @@ sed "s|HOOKSDIR|${HOOKSDIR}|" hooks/checkhook.json > ${HOOKSDIR}/checkhook.json
@test "pod test hooks" {
rm -f /run/hookscheck
start_crio
run crictl runs "$TESTDATA"/sandbox_config.json
run crictl runp "$TESTDATA"/sandbox_config.json
echo "$output"
[ "$status" -eq 0 ]
pod_id="$output"
@ -23,10 +23,10 @@ sed "s|HOOKSDIR|${HOOKSDIR}|" hooks/checkhook.json > ${HOOKSDIR}/checkhook.json
run crictl start "$ctr_id"
echo "$output"
[ "$status" -eq 0 ]
run crictl stops "$pod_id"
run crictl stopp "$pod_id"
echo "$output"
[ "$status" -eq 0 ]
run crictl rms "$pod_id"
run crictl rmp "$pod_id"
echo "$output"
[ "$status" -eq 0 ]
run cat /run/hookscheck

View File

@ -12,7 +12,7 @@ function teardown() {
@test "run container in pod with image ID" {
start_crio
run crictl runs "$TESTDATA"/sandbox_config.json
run crictl runp "$TESTDATA"/sandbox_config.json
echo "$output"
[ "$status" -eq 0 ]
pod_id="$output"
@ -32,7 +32,7 @@ function teardown() {
@test "container status when created by image ID" {
start_crio
run crictl runs "$TESTDATA"/sandbox_config.json
run crictl runp "$TESTDATA"/sandbox_config.json
echo "$output"
[ "$status" -eq 0 ]
pod_id="$output"
@ -58,7 +58,7 @@ function teardown() {
@test "container status when created by image tagged reference" {
start_crio
run crictl runs "$TESTDATA"/sandbox_config.json
run crictl runp "$TESTDATA"/sandbox_config.json
echo "$output"
[ "$status" -eq 0 ]
pod_id="$output"
@ -84,7 +84,7 @@ function teardown() {
@test "container status when created by image canonical reference" {
start_crio
run crictl runs "$TESTDATA"/sandbox_config.json
run crictl runp "$TESTDATA"/sandbox_config.json
echo "$output"
[ "$status" -eq 0 ]
pod_id="$output"

View File

@ -8,7 +8,7 @@ function teardown() {
@test "image volume ignore" {
IMAGE_VOLUMES=ignore start_crio
run crictl runs "$TESTDATA"/sandbox_config.json
run crictl runp "$TESTDATA"/sandbox_config.json
echo "$output"
[ "$status" -eq 0 ]
pod_id="$output"
@ -26,10 +26,10 @@ function teardown() {
[ "$status" -eq 0 ]
[[ "$output" =~ "Exit code: 1" ]]
[[ "$output" =~ "ls: /imagevolume: No such file or directory" ]]
run crictl stops "$pod_id"
run crictl stopp "$pod_id"
echo "$output"
[ "$status" -eq 0 ]
run crictl rms "$pod_id"
run crictl rmp "$pod_id"
echo "$output"
[ "$status" -eq 0 ]
cleanup_ctrs
@ -39,7 +39,7 @@ function teardown() {
@test "image volume bind" {
IMAGE_VOLUMES=bind start_crio
run crictl runs "$TESTDATA"/sandbox_config.json
run crictl runp "$TESTDATA"/sandbox_config.json
echo "$output"
[ "$status" -eq 0 ]
pod_id="$output"
@ -56,10 +56,10 @@ function teardown() {
echo "$output"
[ "$status" -eq 0 ]
[ "$output" = "" ]
run crictl stops "$pod_id"
run crictl stopp "$pod_id"
echo "$output"
[ "$status" -eq 0 ]
run crictl rms "$pod_id"
run crictl rmp "$pod_id"
echo "$output"
[ "$status" -eq 0 ]
cleanup_ctrs

View File

@ -18,7 +18,7 @@ function teardown() {
@test "ctr inspect" {
start_crio
run crictl runs "$TESTDATA"/sandbox_config.json
run crictl runp "$TESTDATA"/sandbox_config.json
echo "$output"
[ "$status" -eq 0 ]
pod_id="$output"
@ -40,7 +40,7 @@ function teardown() {
[[ "$output" =~ "\"image\": \"docker.io/library/redis:alpine\"" ]]
[[ "$output" =~ "\"imageRef\": \"$REDIS_IMAGEREF\"" ]]
run crictl inspects --output json "$pod_id"
run crictl inspectp --output json "$pod_id"
echo "$output"
[ "$status" -eq 0 ]

View File

@ -9,7 +9,7 @@ function teardown() {
function pid_namespace_test() {
start_crio
run crictl runs "$TESTDATA"/sandbox_config.json
run crictl runp "$TESTDATA"/sandbox_config.json
echo "$output"
[ "$status" -eq 0 ]
pod_id="$output"
@ -25,10 +25,10 @@ function pid_namespace_test() {
[ "$status" -eq 0 ]
[[ "$output" =~ "${EXPECTED_INIT:-redis}" ]]
run crictl stops "$pod_id"
run crictl stopp "$pod_id"
echo "$output"
[ "$status" -eq 0 ]
run crictl rms "$pod_id"
run crictl rmp "$pod_id"
echo "$output"
[ "$status" -eq 0 ]
cleanup_ctrs

View File

@ -13,7 +13,7 @@ function teardown() {
@test "ensure correct hostname" {
start_crio
run crictl runs "$TESTDATA"/sandbox_config.json
run crictl runp "$TESTDATA"/sandbox_config.json
echo "$output"
[ "$status" -eq 0 ]
pod_id="$output"
@ -43,7 +43,7 @@ function teardown() {
start_crio
hostnetworkconfig=$(cat "$TESTDATA"/sandbox_config.json | python -c 'import json,sys;obj=json.load(sys.stdin);obj["linux"]["security_context"]["namespace_options"]["host_network"] = True; obj["annotations"] = {}; obj["hostname"] = ""; json.dump(obj, sys.stdout)')
echo "$hostnetworkconfig" > "$TESTDIR"/sandbox_hostnetwork_config.json
run crictl runs "$TESTDIR"/sandbox_hostnetwork_config.json
run crictl runp "$TESTDIR"/sandbox_hostnetwork_config.json
echo "$output"
[ "$status" -eq 0 ]
pod_id="$output"
@ -71,7 +71,7 @@ function teardown() {
@test "Check for valid pod netns CIDR" {
start_crio
run crictl runs "$TESTDATA"/sandbox_config.json
run crictl runp "$TESTDATA"/sandbox_config.json
echo "$output"
[ "$status" -eq 0 ]
pod_id="$output"
@ -87,7 +87,7 @@ function teardown() {
@test "Ping pod from the host" {
start_crio
run crictl runs "$TESTDATA"/sandbox_config.json
run crictl runp "$TESTDATA"/sandbox_config.json
echo "$output"
[ "$status" -eq 0 ]
pod_id="$output"
@ -102,7 +102,7 @@ function teardown() {
@test "Ping pod from another pod" {
start_crio
run crictl runs "$TESTDATA"/sandbox_config.json
run crictl runp "$TESTDATA"/sandbox_config.json
echo "$output"
[ "$status" -eq 0 ]
pod1_id="$output"
@ -113,7 +113,7 @@ function teardown() {
temp_sandbox_conf cni_test
run crictl runs "$TESTDIR"/sandbox_config_cni_test.json
run crictl runp "$TESTDIR"/sandbox_config_cni_test.json
echo "$output"
[ "$status" -eq 0 ]
pod2_id="$output"
@ -132,7 +132,7 @@ function teardown() {
skip "bridge-custom plugin not available"
fi
start_crio "" "" "" "prepare_plugin_test_args_network_conf"
run crictl runs "$TESTDATA"/sandbox_config.json
run crictl runp "$TESTDATA"/sandbox_config.json
[ "$status" -eq 0 ]
. /tmp/plugin_test_args.out
@ -147,7 +147,7 @@ function teardown() {
@test "Connect to pod hostport from the host" {
start_crio
run crictl runs "$TESTDATA"/sandbox_config_hostport.json
run crictl runp "$TESTDATA"/sandbox_config_hostport.json
echo "$output"
[ "$status" -eq 0 ]
pod_id="$output"
@ -180,7 +180,7 @@ function teardown() {
# make conmon non-executable to cause the sandbox setup to fail after
# networking has been configured
chmod 0644 $CONMON_BINARY
run crictl runs "$TESTDATA"/sandbox_config.json
run crictl runp "$TESTDATA"/sandbox_config.json
chmod 0755 $CONMON_BINARY
echo "$output"
[ "$status" -ne 0 ]

View File

@ -9,24 +9,24 @@ function teardown() {
# PR#59
@test "pod release name on remove" {
start_crio
run crictl runs "$TESTDATA"/sandbox_config.json
run crictl runp "$TESTDATA"/sandbox_config.json
echo "$output"
[ "$status" -eq 0 ]
id="$output"
run crictl stops "$id"
run crictl stopp "$id"
echo "$output"
[ "$status" -eq 0 ]
run crictl rms "$id"
run crictl rmp "$id"
echo "$output"
[ "$status" -eq 0 ]
run crictl runs "$TESTDATA"/sandbox_config.json
run crictl runp "$TESTDATA"/sandbox_config.json
echo "$output"
[ "$status" -eq 0 ]
id="$output"
run crictl stops "$id"
run crictl stopp "$id"
echo "$output"
[ "$status" -eq 0 ]
run crictl rms "$id"
run crictl rmp "$id"
echo "$output"
[ "$status" -eq 0 ]
cleanup_ctrs
@ -36,7 +36,7 @@ function teardown() {
@test "pod remove" {
start_crio
run crictl runs "$TESTDATA"/sandbox_config.json
run crictl runp "$TESTDATA"/sandbox_config.json
echo "$output"
[ "$status" -eq 0 ]
pod_id="$output"
@ -47,10 +47,10 @@ function teardown() {
run crictl start "$ctr_id"
echo "$output"
[ "$status" -eq 0 ]
run crictl stops "$pod_id"
run crictl stopp "$pod_id"
echo "$output"
[ "$status" -eq 0 ]
run crictl rms "$pod_id"
run crictl rmp "$pod_id"
echo "$output"
[ "$status" -eq 0 ]
cleanup_ctrs
@ -61,18 +61,18 @@ function teardown() {
@test "pod stop ignores not found sandboxes" {
start_crio
run crictl runs "$TESTDATA"/sandbox_config.json
run crictl runp "$TESTDATA"/sandbox_config.json
echo "$output"
[ "$status" -eq 0 ]
pod_id="$output"
run crictl stops "$pod_id"
run crictl stopp "$pod_id"
echo "$output"
[ "$status" -eq 0 ]
run crictl rms "$pod_id"
run crictl rmp "$pod_id"
echo "$output"
[ "$status" -eq 0 ]
run crictl stops "$pod_id"
run crictl stopp "$pod_id"
echo "$output"
[ "$status" -eq 0 ]
@ -83,90 +83,90 @@ function teardown() {
@test "pod list filtering" {
start_crio
run crictl runs "$TESTDATA"/sandbox1_config.json
run crictl runp "$TESTDATA"/sandbox1_config.json
echo "$output"
[ "$status" -eq 0 ]
pod1_id="$output"
run crictl runs "$TESTDATA"/sandbox2_config.json
run crictl runp "$TESTDATA"/sandbox2_config.json
echo "$output"
[ "$status" -eq 0 ]
pod2_id="$output"
run crictl runs "$TESTDATA"/sandbox3_config.json
run crictl runp "$TESTDATA"/sandbox3_config.json
echo "$output"
[ "$status" -eq 0 ]
pod3_id="$output"
run crictl sandboxes --label "name=podsandbox3" --quiet
run crictl pods --label "name=podsandbox3" --quiet
echo "$output"
[ "$status" -eq 0 ]
#[[ "$output" != "" ]]
[[ "$output" == "$pod3_id" ]]
run crictl sandboxes --label "label=not-exist" --quiet
run crictl pods --label "label=not-exist" --quiet
echo "$output"
[ "$status" -eq 0 ]
[[ "$output" == "" ]]
run crictl sandboxes --label "group=test" --label "version=v1.0.0" --quiet
run crictl pods --label "group=test" --label "version=v1.0.0" --quiet
echo "$output"
[ "$status" -eq 0 ]
[[ "$output" != "" ]]
[[ "$output" =~ "$pod1_id" ]]
[[ "$output" =~ "$pod2_id" ]]
[[ "$output" != "$pod3_id" ]]
run crictl sandboxes --label "group=test" --quiet
run crictl pods --label "group=test" --quiet
echo "$output"
[ "$status" -eq 0 ]
[[ "$output" != "" ]]
[[ "$output" =~ "$pod1_id" ]]
[[ "$output" =~ "$pod2_id" ]]
[[ "$output" =~ "$pod3_id" ]]
run crictl sandboxes --id "$pod1_id" --quiet
run crictl pods --id "$pod1_id" --quiet
echo "$output"
[ "$status" -eq 0 ]
[[ "$output" == "$pod1_id" ]]
# filter by truncated id should work as well
run crictl sandboxes --id "${pod1_id:0:4}" --quiet
run crictl pods --id "${pod1_id:0:4}" --quiet
echo "$output"
[ "$status" -eq 0 ]
[[ "$output" == "$pod1_id" ]]
run crictl sandboxes --id "$pod2_id" --quiet
run crictl pods --id "$pod2_id" --quiet
echo "$output"
[ "$status" -eq 0 ]
[[ "$output" == "$pod2_id" ]]
run crictl sandboxes --id "$pod3_id" --quiet
run crictl pods --id "$pod3_id" --quiet
echo "$output"
[ "$status" -eq 0 ]
[[ "$output" == "$pod3_id" ]]
run crictl sandboxes --id "$pod1_id" --label "group=test" --quiet
run crictl pods --id "$pod1_id" --label "group=test" --quiet
echo "$output"
[ "$status" -eq 0 ]
[[ "$output" == "$pod1_id" ]]
run crictl sandboxes --id "$pod2_id" --label "group=test" --quiet
run crictl pods --id "$pod2_id" --label "group=test" --quiet
echo "$output"
[ "$status" -eq 0 ]
[[ "$output" == "$pod2_id" ]]
run crictl sandboxes --id "$pod3_id" --label "group=test" --quiet
run crictl pods --id "$pod3_id" --label "group=test" --quiet
echo "$output"
[ "$status" -eq 0 ]
[[ "$output" == "$pod3_id" ]]
run crictl sandboxes --id "$pod3_id" --label "group=production" --quiet
run crictl pods --id "$pod3_id" --label "group=production" --quiet
echo "$output"
[ "$status" -eq 0 ]
[[ "$output" == "" ]]
run crictl stops "$pod1_id"
run crictl stopp "$pod1_id"
echo "$output"
[ "$status" -eq 0 ]
run crictl rms "$pod1_id"
run crictl rmp "$pod1_id"
echo "$output"
[ "$status" -eq 0 ]
run crictl stops "$pod2_id"
run crictl stopp "$pod2_id"
echo "$output"
[ "$status" -eq 0 ]
run crictl rms "$pod2_id"
run crictl rmp "$pod2_id"
echo "$output"
[ "$status" -eq 0 ]
run crictl stops "$pod3_id"
run crictl stopp "$pod3_id"
echo "$output"
[ "$status" -eq 0 ]
run crictl rms "$pod3_id"
run crictl rmp "$pod3_id"
echo "$output"
[ "$status" -eq 0 ]
cleanup_pods
@ -175,12 +175,12 @@ function teardown() {
@test "pod metadata in list & status" {
start_crio
run crictl runs "$TESTDATA"/sandbox_config.json
run crictl runp "$TESTDATA"/sandbox_config.json
echo "$output"
[ "$status" -eq 0 ]
pod_id="$output"
run crictl sandboxes --id "$pod_id" --verbose
run crictl pods --id "$pod_id" --verbose
echo "$output"
[ "$status" -eq 0 ]
# TODO: expected value should not hard coded here
@ -189,7 +189,7 @@ function teardown() {
[[ "$output" =~ "Namespace: redhat.test.crio" ]]
[[ "$output" =~ "Attempt: 1" ]]
run crictl inspects "$pod_id"
run crictl inspectp "$pod_id" --output table
echo "$output"
[ "$status" -eq 0 ]
# TODO: expected value should not hard coded here
@ -204,7 +204,7 @@ function teardown() {
@test "pass pod sysctls to runtime" {
start_crio
run crictl runs "$TESTDATA"/sandbox_config_sysctl.json
run crictl runp "$TESTDATA"/sandbox_config_sysctl.json
echo "$output"
[ "$status" -eq 0 ]
pod_id="$output"
@ -239,14 +239,14 @@ function teardown() {
@test "pod stop idempotent" {
start_crio
run crictl runs "$TESTDATA"/sandbox_config.json
run crictl runp "$TESTDATA"/sandbox_config.json
echo "$output"
[ "$status" -eq 0 ]
pod_id="$output"
run crictl stops "$pod_id"
run crictl stopp "$pod_id"
echo "$output"
[ "$status" -eq 0 ]
run crictl stops "$pod_id"
run crictl stopp "$pod_id"
echo "$output"
[ "$status" -eq 0 ]
@ -257,17 +257,17 @@ function teardown() {
@test "pod remove idempotent" {
start_crio
run crictl runs "$TESTDATA"/sandbox_config.json
run crictl runp "$TESTDATA"/sandbox_config.json
echo "$output"
[ "$status" -eq 0 ]
pod_id="$output"
run crictl stops "$pod_id"
run crictl stopp "$pod_id"
echo "$output"
[ "$status" -eq 0 ]
run crictl rms "$pod_id"
run crictl rmp "$pod_id"
echo "$output"
[ "$status" -eq 0 ]
run crictl rms "$pod_id"
run crictl rmp "$pod_id"
echo "$output"
[ "$status" -eq 0 ]
@ -278,7 +278,7 @@ function teardown() {
@test "pod stop idempotent with ctrs already stopped" {
start_crio
run crictl runs "$TESTDATA"/sandbox_config.json
run crictl runp "$TESTDATA"/sandbox_config.json
echo "$output"
[ "$status" -eq 0 ]
pod_id="$output"
@ -292,7 +292,7 @@ function teardown() {
run crictl stop "$ctr_id"
echo "$output"
[ "$status" -eq 0 ]
run crictl stops "$pod_id"
run crictl stopp "$pod_id"
echo "$output"
[ "$status" -eq 0 ]
@ -303,16 +303,16 @@ function teardown() {
@test "restart crio and still get pod status" {
start_crio
run crictl runs "$TESTDATA"/sandbox_config.json
run crictl runp "$TESTDATA"/sandbox_config.json
echo "$output"
[ "$status" -eq 0 ]
pod_id="$output"
run crictl stops "$pod_id"
run crictl stopp "$pod_id"
echo "$output"
[ "$status" -eq 0 ]
restart_crio
run crictl inspects "$pod_id"
run crictl inspectp "$pod_id"
echo "$output"
[ "$status" -eq 0 ]
[ "$output" != "" ]
@ -331,7 +331,7 @@ function teardown() {
echo "$wrong_cgroup_parent_config" > "$TESTDIR"/sandbox_wrong_cgroup_parent.json
start_crio
run crictl runs "$TESTDIR"/sandbox_wrong_cgroup_parent.json
run crictl runp "$TESTDIR"/sandbox_wrong_cgroup_parent.json
echo "$output"
[ "$status" -eq 1 ]
@ -347,7 +347,7 @@ function teardown() {
echo "$cgroup_parent_config" > "$TESTDIR"/sandbox_systemd_cgroup_parent.json
start_crio
run crictl runs "$TESTDIR"/sandbox_systemd_cgroup_parent.json
run crictl runp "$TESTDIR"/sandbox_systemd_cgroup_parent.json
echo "$output"
[ "$status" -eq 0 ]
pod_id="$output"

View File

@ -8,17 +8,17 @@ function teardown() {
@test "crio restore" {
start_crio
run crictl runs "$TESTDATA"/sandbox_config.json
run crictl runp "$TESTDATA"/sandbox_config.json
echo "$output"
[ "$status" -eq 0 ]
pod_id="$output"
run crictl sandboxes --quiet --id "$pod_id"
run crictl pods --quiet --id "$pod_id"
echo "$output"
[ "$status" -eq 0 ]
pod_list_info="$output"
run crictl inspects "$pod_id"
run crictl inspectp "$pod_id" --output table
echo "$output"
[ "$status" -eq 0 ]
pod_status_info=`echo "$output" | grep Status`
@ -28,12 +28,12 @@ function teardown() {
[ "$status" -eq 0 ]
ctr_id="$output"
run crictl ps --quiet --id "$ctr_id"
run crictl ps --quiet --id "$ctr_id" --all
echo "$output"
[ "$status" -eq 0 ]
ctr_list_info="$output"
run crictl inspect "$ctr_id"
run crictl inspect "$ctr_id" --output table
echo "$output"
[ "$status" -eq 0 ]
ctr_status_info=`echo "$output" | grep State`
@ -41,35 +41,35 @@ function teardown() {
stop_crio
start_crio
run crictl sandboxes --quiet
run crictl pods --quiet
echo "$output"
[ "$status" -eq 0 ]
[[ "${output}" != "" ]]
[[ "${output}" == "${pod_id}" ]]
run crictl sandboxes --quiet --id "$pod_id"
run crictl pods --quiet --id "$pod_id"
echo "$output"
[ "$status" -eq 0 ]
[[ "${output}" == "${pod_list_info}" ]]
run crictl inspects "$pod_id"
run crictl inspectp "$pod_id" --output table
echo "$output"
[ "$status" -eq 0 ]
output=`echo "$output" | grep Status`
[[ "${output}" == "${pod_status_info}" ]]
run crictl ps --quiet
run crictl ps --quiet --all
echo "$output"
[ "$status" -eq 0 ]
[[ "${output}" != "" ]]
[[ "${output}" == "${ctr_id}" ]]
run crictl ps --quiet --id "$ctr_id"
run crictl ps --quiet --id "$ctr_id" --all
echo "$output"
[ "$status" -eq 0 ]
[[ "${output}" == "${ctr_list_info}" ]]
run crictl inspect "$ctr_id"
run crictl inspect "$ctr_id" --output table
echo "$output"
[ "$status" -eq 0 ]
output=`echo "$output" | grep State`
@ -82,12 +82,12 @@ function teardown() {
@test "crio restore with bad state and pod stopped" {
start_crio
run crictl runs "$TESTDATA"/sandbox_config.json
run crictl runp "$TESTDATA"/sandbox_config.json
echo "$output"
[ "$status" -eq 0 ]
pod_id="$output"
run crictl stops "$pod_id"
run crictl stopp "$pod_id"
echo "$output"
[ "$status" -eq 0 ]
@ -98,7 +98,7 @@ function teardown() {
start_crio
run crictl stops "$pod_id"
run crictl stopp "$pod_id"
echo "$output"
[ "$status" -eq 0 ]
@ -108,7 +108,7 @@ function teardown() {
@test "crio restore with bad state and ctr stopped" {
start_crio
run crictl runs "$TESTDATA"/sandbox_config.json
run crictl runp "$TESTDATA"/sandbox_config.json
echo "$output"
[ "$status" -eq 0 ]
pod_id="$output"
@ -140,7 +140,7 @@ function teardown() {
@test "crio restore with bad state and ctr removed" {
start_crio
run crictl runs "$TESTDATA"/sandbox_config.json
run crictl runp "$TESTDATA"/sandbox_config.json
echo "$output"
[ "$status" -eq 0 ]
pod_id="$output"
@ -177,16 +177,16 @@ function teardown() {
@test "crio restore with bad state and pod removed" {
start_crio
run crictl runs "$TESTDATA"/sandbox_config.json
run crictl runp "$TESTDATA"/sandbox_config.json
echo "$output"
[ "$status" -eq 0 ]
pod_id="$output"
run crictl stops "$pod_id"
run crictl stopp "$pod_id"
echo "$output"
[ "$status" -eq 0 ]
run crictl rms "$pod_id"
run crictl rmp "$pod_id"
echo "$output"
[ "$status" -eq 0 ]
@ -197,7 +197,7 @@ function teardown() {
start_crio
run crictl stops "$pod_id"
run crictl stopp "$pod_id"
echo "$output"
[ "$status" -eq 0 ]
@ -207,12 +207,12 @@ function teardown() {
@test "crio restore with bad state" {
start_crio
run crictl runs "$TESTDATA"/sandbox_config.json
run crictl runp "$TESTDATA"/sandbox_config.json
echo "$output"
[ "$status" -eq 0 ]
pod_id="$output"
run crictl inspects "$pod_id"
run crictl inspectp "$pod_id"
echo "$output"
[ "$status" -eq 0 ]
[[ "${output}" =~ "SANDBOX_READY" ]]
@ -222,7 +222,7 @@ function teardown() {
[ "$status" -eq 0 ]
ctr_id="$output"
run crictl inspect "$ctr_id"
run crictl inspect "$ctr_id" --output table
echo "$output"
[ "$status" -eq 0 ]
[[ "${output}" =~ "CONTAINER_CREATED" ]]
@ -233,34 +233,34 @@ function teardown() {
for i in $("$RUNTIME" list -q | xargs); do "$RUNTIME" delete -f $i; done
start_crio
run crictl sandboxes --quiet
run crictl pods --quiet
echo "$output"
[ "$status" -eq 0 ]
[[ "${output}" != "" ]]
[[ "${output}" =~ "${pod_id}" ]]
run crictl inspects "$pod_id"
run crictl inspectp "$pod_id"
echo "$output"
[ "$status" -eq 0 ]
[[ "${output}" =~ "SANDBOX_NOTREADY" ]]
run crictl ps --quiet
run crictl ps --quiet --all
echo "$output"
[ "$status" -eq 0 ]
[[ "${output}" != "" ]]
[[ "${output}" =~ "${ctr_id}" ]]
run crictl inspect "$ctr_id"
run crictl inspect "$ctr_id" --output table
echo "$output"
[ "$status" -eq 0 ]
[[ "${output}" =~ "CONTAINER_EXITED" ]]
# TODO: may be cri-tool should display Exit Code
#[[ "${output}" =~ "Exit Code: 255" ]]
run crictl stops "$pod_id"
run crictl stopp "$pod_id"
echo "$output"
[ "$status" -eq 0 ]
run crictl rms "$pod_id"
run crictl rmp "$pod_id"
echo "$output"
[ "$status" -eq 0 ]

View File

@ -8,7 +8,7 @@ function teardown() {
@test "ctr termination reason Completed" {
start_crio
run crictl runs "$TESTDATA"/sandbox_config_selinux.json
run crictl runp "$TESTDATA"/sandbox_config_selinux.json
echo "$output"
[ "$status" -eq 0 ]
pod_id="$output"

View File

@ -419,15 +419,15 @@ sudo crictl rm $CONTAINER_ID
```
```
sudo crictl stops $POD_ID
sudo crictl stopp $POD_ID
```
```
sudo crictl rms $POD_ID
sudo crictl rmp $POD_ID
```
```
sudo crictl sandboxes
sudo crictl pods
```
```