parent
573971252e
commit
b43ce464c3
@ -14,4 +14,4 @@
|
|||||||
# If the name does not contain a registry, the local image storage will be
|
# If the name does not contain a registry, the local image storage will be
|
||||||
# consulted, and if it's not present there then it will be pulled from a
|
# consulted, and if it's not present there then it will be pulled from a
|
||||||
# suitable remote registry.
|
# suitable remote registry.
|
||||||
image = "registry.access.redhat.com/ubi8:latest"
|
image = "registry-proxy.engineering.redhat.com/rh-osbs/toolbox-container:8.5-6"
|
||||||
|
@ -13,6 +13,5 @@
|
|||||||
package: toolbox
|
package: toolbox
|
||||||
environment:
|
environment:
|
||||||
PODMAN: /usr/bin/podman
|
PODMAN: /usr/bin/podman
|
||||||
TOOLBOX_TEST_SYSTEM_ID: rhel
|
TOOLBOX_TEST_DEFAULT_CONTAINER_NAME: toolbox-container-8.5-6
|
||||||
TOOLBOX_TEST_VERSION_ID: 8.4
|
|
||||||
become: true
|
become: true
|
@ -1,4 +1,4 @@
|
|||||||
From a61da78628b59704739c546521057877c69f601c Mon Sep 17 00:00:00 2001
|
From b3eda81c7143221c78fd23d8a645e28f033b3963 Mon Sep 17 00:00:00 2001
|
||||||
From: Oliver Gutierrez <ogutsua@gmail.com>
|
From: Oliver Gutierrez <ogutsua@gmail.com>
|
||||||
Date: Tue, 14 Sep 2021 13:41:17 +0100
|
Date: Tue, 14 Sep 2021 13:41:17 +0100
|
||||||
Subject: [PATCH] Tests fixes for gating
|
Subject: [PATCH] Tests fixes for gating
|
||||||
@ -20,7 +20,7 @@ index 4ff02c6..cca3da4 100644
|
|||||||
run $TOOLBOX help
|
run $TOOLBOX help
|
||||||
|
|
||||||
diff --git a/test/system/101-create.bats b/test/system/101-create.bats
|
diff --git a/test/system/101-create.bats b/test/system/101-create.bats
|
||||||
index 3cc3eaf..937342a 100644
|
index 3cc3eaf..63d4fcb 100644
|
||||||
--- a/test/system/101-create.bats
|
--- a/test/system/101-create.bats
|
||||||
+++ b/test/system/101-create.bats
|
+++ b/test/system/101-create.bats
|
||||||
@@ -5,6 +5,7 @@ load 'libs/bats-assert/load'
|
@@ -5,6 +5,7 @@ load 'libs/bats-assert/load'
|
||||||
@ -31,15 +31,6 @@ index 3cc3eaf..937342a 100644
|
|||||||
cleanup_containers
|
cleanup_containers
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -13,7 +14,7 @@ teardown() {
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
-@test "create: Create the default container" {
|
|
||||||
+@test "create: Create the default container ($(get_system_id)-$(get_system_version))" {
|
|
||||||
pull_default_image
|
|
||||||
|
|
||||||
run $TOOLBOX -y create
|
|
||||||
@@ -62,7 +63,7 @@ teardown() {
|
@@ -62,7 +63,7 @@ teardown() {
|
||||||
|
|
||||||
assert_success
|
assert_success
|
||||||
@ -50,7 +41,7 @@ index 3cc3eaf..937342a 100644
|
|||||||
# Make sure the container has actually been created
|
# Make sure the container has actually been created
|
||||||
run podman ps -a
|
run podman ps -a
|
||||||
diff --git a/test/system/102-list.bats b/test/system/102-list.bats
|
diff --git a/test/system/102-list.bats b/test/system/102-list.bats
|
||||||
index 184ad6c..770e8d2 100644
|
index 184ad6c..2f80843 100644
|
||||||
--- a/test/system/102-list.bats
|
--- a/test/system/102-list.bats
|
||||||
+++ b/test/system/102-list.bats
|
+++ b/test/system/102-list.bats
|
||||||
@@ -5,6 +5,7 @@ load 'libs/bats-assert/load'
|
@@ -5,6 +5,7 @@ load 'libs/bats-assert/load'
|
||||||
@ -61,6 +52,48 @@ index 184ad6c..770e8d2 100644
|
|||||||
cleanup_all
|
cleanup_all
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -61,14 +62,14 @@ teardown() {
|
||||||
|
run $TOOLBOX list --images
|
||||||
|
|
||||||
|
assert_success
|
||||||
|
- assert_output --partial "$(get_system_id)-toolbox:$(get_system_version)"
|
||||||
|
+ assert_output --partial "$(get_default_image_name)"
|
||||||
|
assert_output --partial "fedora-toolbox:32"
|
||||||
|
|
||||||
|
# Check containers
|
||||||
|
run $TOOLBOX list --containers
|
||||||
|
|
||||||
|
assert_success
|
||||||
|
- assert_output --partial "$(get_system_id)-toolbox-$(get_system_version)"
|
||||||
|
+ assert_output --partial "$(get_default_container_name)"
|
||||||
|
assert_output --partial "non-default-one"
|
||||||
|
assert_output --partial "non-default-two"
|
||||||
|
|
||||||
|
@@ -76,9 +77,9 @@ teardown() {
|
||||||
|
run $TOOLBOX list
|
||||||
|
|
||||||
|
assert_success
|
||||||
|
- assert_output --partial "$(get_system_id)-toolbox:$(get_system_version)"
|
||||||
|
+ assert_output --partial "$(get_default_image_name)"
|
||||||
|
assert_output --partial "fedora-toolbox:32"
|
||||||
|
- assert_output --partial "$(get_system_id)-toolbox-$(get_system_version)"
|
||||||
|
+ assert_output --partial "$(get_default_container_name)"
|
||||||
|
assert_output --partial "non-default-one"
|
||||||
|
assert_output --partial "non-default-two"
|
||||||
|
}
|
||||||
|
diff --git a/test/system/103-container.bats b/test/system/103-container.bats
|
||||||
|
index 01b61e5..554a329 100644
|
||||||
|
--- a/test/system/103-container.bats
|
||||||
|
+++ b/test/system/103-container.bats
|
||||||
|
@@ -14,7 +14,7 @@ teardown() {
|
||||||
|
|
||||||
|
|
||||||
|
@test "container: Check container starts without issues" {
|
||||||
|
- readonly CONTAINER_NAME="$(get_system_id)-toolbox-$(get_system_version)"
|
||||||
|
+ readonly CONTAINER_NAME="$(get_default_container_name)"
|
||||||
|
|
||||||
|
create_default_container
|
||||||
|
|
||||||
diff --git a/test/system/104-run.bats b/test/system/104-run.bats
|
diff --git a/test/system/104-run.bats b/test/system/104-run.bats
|
||||||
index 026126b..03cf291 100644
|
index 026126b..03cf291 100644
|
||||||
--- a/test/system/104-run.bats
|
--- a/test/system/104-run.bats
|
||||||
@ -98,7 +131,7 @@ index 0ef0ebe..b48f802 100644
|
|||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/test/system/libs/helpers.bash b/test/system/libs/helpers.bash
|
diff --git a/test/system/libs/helpers.bash b/test/system/libs/helpers.bash
|
||||||
index d59d661..3d465d3 100644
|
index d59d661..d44b69e 100644
|
||||||
--- a/test/system/libs/helpers.bash
|
--- a/test/system/libs/helpers.bash
|
||||||
+++ b/test/system/libs/helpers.bash
|
+++ b/test/system/libs/helpers.bash
|
||||||
@@ -8,11 +8,10 @@ readonly TOOLBOX=${TOOLBOX:-toolbox}
|
@@ -8,11 +8,10 @@ readonly TOOLBOX=${TOOLBOX:-toolbox}
|
||||||
@ -123,7 +156,7 @@ index d59d661..3d465d3 100644
|
|||||||
local os_release
|
local os_release
|
||||||
|
|
||||||
os_release="$(find_os_release)"
|
os_release="$(find_os_release)"
|
||||||
@@ -255,19 +255,34 @@ function get_system_id() {
|
@@ -255,19 +255,51 @@ function get_system_id() {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo $(awk -F= '/ID/ {print $2}' $os_release | head -n 1)
|
echo $(awk -F= '/ID/ {print $2}' $os_release | head -n 1)
|
||||||
@ -155,15 +188,33 @@ index d59d661..3d465d3 100644
|
|||||||
+ echo ${TOOLBOX_TEST_VERSION_ID}
|
+ echo ${TOOLBOX_TEST_VERSION_ID}
|
||||||
fi
|
fi
|
||||||
+}
|
+}
|
||||||
|
+
|
||||||
|
|
||||||
- echo $(awk -F= '/VERSION_ID/ {print $2}' $os_release | head -n 1)
|
- echo $(awk -F= '/VERSION_ID/ {print $2}' $os_release | head -n 1)
|
||||||
+
|
|
||||||
+# Setup the XDG_RUNTIME_DIR variable if not set
|
+# Setup the XDG_RUNTIME_DIR variable if not set
|
||||||
+function check_xdg_runtime_dir() {
|
+function check_xdg_runtime_dir() {
|
||||||
+ if [[ -z "${XDG_RUNTIME_DIR}" ]]; then
|
+ if [[ -z "${XDG_RUNTIME_DIR}" ]]; then
|
||||||
+ export XDG_RUNTIME_DIR="/run/user/${UID}"
|
+ export XDG_RUNTIME_DIR="/run/user/${UID}"
|
||||||
+ fi
|
+ fi
|
||||||
}
|
}
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+function get_default_container_name() {
|
||||||
|
+ if [[ -z ${TOOLBOX_TEST_DEFAULT_CONTAINER_NAME} ]]; then
|
||||||
|
+ echo $(get_system_id)-toolbox-$(get_system_version)
|
||||||
|
+ else
|
||||||
|
+ echo ${TOOLBOX_TEST_DEFAULT_CONTAINER_NAME}
|
||||||
|
+ fi
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+function get_default_image_name() {
|
||||||
|
+ if [[ -z ${TOOLBOX_TEST_DEFAULT_IMAGE_NAME} ]]; then
|
||||||
|
+ echo $(get_system_id)-toolbox:$(get_system_version)
|
||||||
|
+ else
|
||||||
|
+ echo ${TOOLBOX_TEST_DEFAULT_IMAGE_NAME}
|
||||||
|
+ fi
|
||||||
|
+}
|
||||||
|
\ No newline at end of file
|
||||||
--
|
--
|
||||||
2.31.1
|
2.31.1
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@ Version: 0.0.99.3
|
|||||||
%global goipath github.com/containers/%{name}
|
%global goipath github.com/containers/%{name}
|
||||||
%gometa
|
%gometa
|
||||||
|
|
||||||
Release: 0.11.git660b6970e998%{?dist}
|
Release: 0.12.git660b6970e998%{?dist}
|
||||||
Summary: Unprivileged development environment
|
Summary: Unprivileged development environment
|
||||||
|
|
||||||
License: ASL 2.0
|
License: ASL 2.0
|
||||||
@ -115,6 +115,10 @@ install -m0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/containers/%{name}.conf
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Sep 16 2021 Oliver Gutiérrez <ogutierrez@redhat.com> - 0.0.99.3-0.12.git660b6970e998
|
||||||
|
- Changed image for tests and tests parameters to fix gating
|
||||||
|
Related: #2000051
|
||||||
|
|
||||||
* Thu Sep 16 2021 Oliver Gutiérrez <ogutierrez@redhat.com> - 0.0.99.3-0.11.git660b6970e998
|
* Thu Sep 16 2021 Oliver Gutiérrez <ogutierrez@redhat.com> - 0.0.99.3-0.11.git660b6970e998
|
||||||
- Changed image for tests and added /etc/containers dir check
|
- Changed image for tests and added /etc/containers dir check
|
||||||
Related: #2000051
|
Related: #2000051
|
||||||
|
Loading…
Reference in New Issue
Block a user