summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/kpod_create.bats6
-rw-r--r--test/kpod_history.bats6
-rw-r--r--test/kpod_images.bats6
-rw-r--r--test/kpod_ps.bats9
-rw-r--r--test/kpod_rm.bats4
-rw-r--r--test/kpod_rmi.bats4
-rw-r--r--test/kpod_run.bats17
7 files changed, 41 insertions, 11 deletions
diff --git a/test/kpod_create.bats b/test/kpod_create.bats
index 3d3efcff3..e1a187332 100644
--- a/test/kpod_create.bats
+++ b/test/kpod_create.bats
@@ -21,3 +21,9 @@ function teardown() {
echo "$output"
[ "$status" -eq 0 ]
}
+
+@test "ensure short options" {
+ run ${KPOD_BINARY} ${KPOD_OPTIONS} create -dt ${BB_GLIBC} ls
+ echo "$output"
+ [ "$status" -eq 0 ]
+}
diff --git a/test/kpod_history.bats b/test/kpod_history.bats
index 9ce2be079..5e99696b2 100644
--- a/test/kpod_history.bats
+++ b/test/kpod_history.bats
@@ -45,3 +45,9 @@ function setup() {
echo "$output"
[ "$status" -eq 0 ]
}
+
+@test "kpod history short options" {
+ run ${KPOD_BINARY} ${KPOD_OPTIONS} history -qH $ALPINE
+ echo "$output"
+ [ "$status" -eq 0 ]
+}
diff --git a/test/kpod_images.bats b/test/kpod_images.bats
index 6f0c53670..9812a33c5 100644
--- a/test/kpod_images.bats
+++ b/test/kpod_images.bats
@@ -40,3 +40,9 @@ function teardown() {
echo "$output"
[ "$status" -eq 0 ]
}
+
+@test "kpod images short options" {
+ run ${KPOD_BINARY} ${KPOD_OPTIONS} images -qn
+ echo "$output"
+ [ "$status" -eq 0 ]
+}
diff --git a/test/kpod_ps.bats b/test/kpod_ps.bats
index 859cbaa99..3a5d94f59 100644
--- a/test/kpod_ps.bats
+++ b/test/kpod_ps.bats
@@ -120,3 +120,12 @@ function teardown() {
[ "$status" -eq 0 ]
run ${KPOD_BINARY} ${KPOD_OPTIONS} stop $ctr_id
}
+
+@test "kpod ps short options" {
+ run ${KPOD_BINARY} ${KPOD_OPTIONS} run -d ${ALPINE} sleep 99
+ ctr_id="$output"
+ run bash -c ${KPOD_BINARY} ${KPOD_OPTIONS} ps -aqs
+ echo "$output"
+ [ "$status" -eq 0 ]
+ run ${KPOD_BINARY} ${KPOD_OPTIONS} stop $ctr_id
+}
diff --git a/test/kpod_rm.bats b/test/kpod_rm.bats
index e9843659a..3a7821b56 100644
--- a/test/kpod_rm.bats
+++ b/test/kpod_rm.bats
@@ -60,12 +60,12 @@ function teardown() {
[ "$status" -eq 0 ]
}
-@test "remove all containers with one running" {
+@test "remove all containers with one running with short options" {
${KPOD_BINARY} ${KPOD_OPTIONS} create $BB ls
${KPOD_BINARY} ${KPOD_OPTIONS} create $BB ls -l
${KPOD_BINARY} ${KPOD_OPTIONS} create $BB whoami
${KPOD_BINARY} ${KPOD_OPTIONS} run -d ${ALPINE} sleep 30
- run ${KPOD_BINARY} $KPOD_OPTIONS rm -a -f
+ run ${KPOD_BINARY} $KPOD_OPTIONS rm -af
echo "$output"
[ "$status" -eq 0 ]
}
diff --git a/test/kpod_rmi.bats b/test/kpod_rmi.bats
index 77990d500..034fd9ab7 100644
--- a/test/kpod_rmi.bats
+++ b/test/kpod_rmi.bats
@@ -43,10 +43,10 @@ function pullImages() {
[ "$status" -eq 0 ]
}
-@test "kpod rmi all images forceably" {
+@test "kpod rmi all images forceably with short options" {
pullImages
${KPOD_BINARY} $KPOD_OPTIONS create ${IMAGE1} ls
- run ${KPOD_BINARY} $KPOD_OPTIONS rmi -a -f
+ run ${KPOD_BINARY} $KPOD_OPTIONS rmi -af
echo "$output"
[ "$status" -eq 0 ]
}
diff --git a/test/kpod_run.bats b/test/kpod_run.bats
index 5f5377a5e..09a66b874 100644
--- a/test/kpod_run.bats
+++ b/test/kpod_run.bats
@@ -16,6 +16,12 @@ function setup() {
[ "$status" -eq 0 ]
}
+@test "run a container based on local image with short options" {
+ run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} run -dt $BB ls"
+ echo "$output"
+ [ "$status" -eq 0 ]
+}
+
@test "run a container based on a remote image" {
run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} run ${BB_GLIBC} ls"
echo "$output"
@@ -65,25 +71,22 @@ function setup() {
}
@test "run environment test" {
-
- ${KPOD_BINARY} ${KPOD_OPTIONS} pull ${ALPINE}
-
- run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} run -env FOO=BAR ${ALPINE} printenv FOO | tr -d '\r'"
+ run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} run --env FOO=BAR ${ALPINE} printenv FOO | tr -d '\r'"
echo "$output"
[ "$status" -eq 0 ]
[ $output = "BAR" ]
- run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} run -env PATH="/bin" ${ALPINE} printenv PATH | tr -d '\r'"
+ run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} run --env PATH="/bin" ${ALPINE} printenv PATH | tr -d '\r'"
echo "$output"
[ "$status" -eq 0 ]
[ $output = "/bin" ]
- run bash -c "export FOO=BAR; ${KPOD_BINARY} ${KPOD_OPTIONS} run -env FOO ${ALPINE} printenv FOO | tr -d '\r'"
+ run bash -c "export FOO=BAR; ${KPOD_BINARY} ${KPOD_OPTIONS} run --env FOO ${ALPINE} printenv FOO | tr -d '\r'"
echo "$output"
[ "$status" -eq 0 ]
[ "$output" = "BAR" ]
- run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} run -env FOO ${ALPINE} printenv"
+ run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} run --env FOO ${ALPINE} printenv"
echo "$output"
[ "$status" -ne 0 ]