Skip to content

Commit

Permalink
test/system: Bump secondary fedora image from 29 to 32
Browse files Browse the repository at this point in the history
The fedora-toolbox:32 image is the first of images in the renamed
toolbox image repository[0]. With the change we can drop the
pull_image_old() function because it was kept only for the old image.

[0] containers#615

containers#780
  • Loading branch information
HarryMichal committed May 28, 2021
1 parent d36cf1c commit 24ff3f9
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 26 deletions.
10 changes: 5 additions & 5 deletions playbooks/setup-env.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,17 +59,17 @@
cmd: "skopeo copy containers-storage:registry.fedoraproject.org/fedora-toolbox:{{ ansible_distribution_version }} dir:{{ zuul.project.src_dir }}/fedora-toolbox-{{ ansible_distribution_version }}"
creates: "{{ zuul.project.src_dir }}/fedora-toolbox-{{ ansible_distribution_version }}/manifest.json"

- name: Pull registry.fedoraproject.org/f29/fedora-toolbox:29
command: podman pull registry.fedoraproject.org/f29/fedora-toolbox:29
- name: Pull registry.fedoraproject.org/fedora-toolbox:32
command: podman pull registry.fedoraproject.org/fedora-toolbox:32
register: _podman
until: _podman.rc == 0
retries: 5
delay: 10

- name: Copy registry.fedoraproject.org/f29/fedora-toolbox:29 to a directory
- name: Copy registry.fedoraproject.org/fedora-toolbox:32 to a directory
command:
cmd: "skopeo copy containers-storage:registry.fedoraproject.org/f29/fedora-toolbox:29 dir:{{ zuul.project.src_dir }}/fedora-toolbox-29"
creates: "{{ zuul.project.src_dir }}/fedora-toolbox-29/manifest.json"
cmd: "skopeo copy containers-storage:registry.fedoraproject.org/fedora-toolbox:32 dir:{{ zuul.project.src_dir }}/fedora-toolbox-32"
creates: "{{ zuul.project.src_dir }}/fedora-toolbox-32/manifest.json"

- name: Clean up the local containers storage
command: podman system reset --force
18 changes: 9 additions & 9 deletions test/system/101-create.bats
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ teardown() {
assert_success
}

@test "create: Create a container with a custom image and name ('fedora29'; f29)" {
pull_image_old 29
@test "create: Create a container with a custom image and name ('fedora32'; f32)" {
pull_image_old 32

run $TOOLBOX -y create -c "fedora29" -i fedora-toolbox:29
run $TOOLBOX -y create -c "fedora32" -i fedora-toolbox:32

assert_success
}
Expand All @@ -53,17 +53,17 @@ teardown() {
assert_line --index 2 "Run 'toolbox --help' for usage."
}

@test "create: Create a container with a distro and release options ('fedora'; f29)" {
pull_image 29
@test "create: Create a container with a distro and release options ('fedora'; f32)" {
pull_image 32

run $TOOLBOX -y create -d "fedora" -r f29
run $TOOLBOX -y create -d "fedora" -r f32

assert_success
assert_output --partial "Created container: fedora-toolbox-29"
assert_output --partial "Enter with: toolbox enter --release 29"
assert_output --partial "Created container: fedora-toolbox-32"
assert_output --partial "Enter with: toolbox enter --release 32"

# Make sure the container has actually been created
run podman ps -a

assert_output --regexp "Created[[:blank:]]+fedora-toolbox-29"
assert_output --regexp "Created[[:blank:]]+fedora-toolbox-32"
}
2 changes: 1 addition & 1 deletion test/system/102-list.bats
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ teardown() {
@test "list: Try to list images and containers (no flag) with 3 containers and 2 images (the list should have 3 images and 2 containers)" {
# Pull the two images
pull_default_image
pull_image_old 29
pull_image 32
# Create tree containers
create_default_container
create_container non-default-one
Expand Down
11 changes: 0 additions & 11 deletions test/system/libs/helpers.bash
Original file line number Diff line number Diff line change
Expand Up @@ -40,17 +40,6 @@ function pull_image() {
}


function pull_image_old() {
local version
local image
version="$1"
image="${REGISTRY_URL}/f${version}/fedora-toolbox:${version}"

$SKOPEO copy "dir:${PROJECT_DIR}/fedora-toolbox-${version}" "containers-storage:${image}"
$PODMAN images
}


function pull_default_image() {
pull_image "${DEFAULT_FEDORA_VERSION}"
}
Expand Down

0 comments on commit 24ff3f9

Please sign in to comment.