SUSE / BCI-tests

This repository contains the tests for the SUSE Base Container Images
Apache License 2.0
10 stars 22 forks source link

add tests for kiwi container image #550

Closed Priyankasaggu11929 closed 3 months ago

Priyankasaggu11929 commented 3 months ago

Part of https://github.com/SUSE/BCI-tests/issues/536

Assumes test setup as - https://github.com/SUSE/BCI-tests/pull/537


steps used for local testing atm:

CONTAINER_RUNTIME=docker OS_VERSION=15.6 TARGET=custom BASEURL=registry.opensuse.org/devel/bci/sle-15-sp6/ tox -e kiwi

CONTAINER_RUNTIME=docker OS_VERSION=tumbleweed TARGET=custom BASEURL=registry.opensuse.org/devel/bci/tumbleweed/ tox -e kiwi
Priyankasaggu11929 commented 3 months ago

@dcermak @dirkmueller few questions:


FYI - test_kiwi_create_image() requires containers created with podman rootful mode to mount loop devices (/dev/loop*), which is not possible with podman rootless run. So, I've disabled the test in case of container_runtime is not docker. ref: https://github.com/containers/podman/issues/17715#issuecomment-1460227771

Priyankasaggu11929 commented 3 months ago

re: failing CI / Lint source code (pull_request)

************* Module tests.test_kiwi
tests/test_kiwi.py:9:0: E0611: No name 'KIWI_CONTAINERS' in module 'bci_tester.data' (no-name-in-module)
tests/test_kiwi.py:40:0: C0116: Missing function or method docstring (missing-function-docstring)
tests/test_kiwi.py:67:0: C0116: Missing function or method docstring (missing-function-docstring)

This should be addressed with changes in https://github.com/SUSE/BCI-tests/pull/537

Rest CI / tox (kiwi, *) (pull_request) tests are also giving similar errors and should be partially addressed by ^.

~But would eventually require kiwi container image on registry.suse.com IIUC.~ (figured out CI pipeline pulls container images from registry.opensuse.org under Devel tab)

dirkmueller commented 3 months ago

@Priyankasaggu11929 I merged the other PR now, please rebase (that should turn this into a greener state)

Priyankasaggu11929 commented 3 months ago

@dirkmueller, rebased PR with the kiwi test plumbing changes, and addressed ^ review comments.

Priyankasaggu11929 commented 3 months ago

Kiwi tests are green in the CI now.

Although, 3 out of the 7 failing CI tests are marked as Required but doesn't have kiwi container images related failure, so, not sure how to bypass them here.

I've added tests based on the steps in kiwi quickstart guide. Outside these, is there any specific kiwi functionality that needs to be tested?

@dirkmueller, also need your input on ^. Thanks!

dirkmueller commented 3 months ago

Although, 3 out of the 7 failing CI tests are marked as Required but doesn't have kiwi container images related failure, so, not sure how to bypass them here.

that's because you are submitting from a fork, you don't have the necessary credentials available there for those CI checks to turn green. don't worry about them.

I've added tests based on the steps in kiwi quickstart guide. Outside these, is there any specific kiwi functionality that needs to be tested?

@dirkmueller, also need your input on ^. Thanks!

I'm okay with the state as is, although I would have loved to see something passing with podman also, but we can always improve on this in a followup.