diff --git a/redfish-client/tests/centos-7-src-p2.dkf b/redfish-client/tests/centos-7-src-p3.dkf similarity index 64% rename from redfish-client/tests/centos-7-src-p2.dkf rename to redfish-client/tests/centos-7-src-p3.dkf index 1814310..fb7f027 100644 --- a/redfish-client/tests/centos-7-src-p2.dkf +++ b/redfish-client/tests/centos-7-src-p3.dkf @@ -1,12 +1,12 @@ FROM centos:7 RUN yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm && \ -yum install -y python-pip +yum install -y python3-pip COPY python-redfish.src.tar.gz /python-redfish.src.tar.gz RUN mkdir /var/log/python-redfish RUN tar xvvf python-redfish.src.tar.gz -RUN pip install --upgrade pip -RUN pip install --upgrade setuptools +RUN pip3 install --upgrade pip +RUN pip3 install --upgrade setuptools RUN cd python-redfish* && \ -pip install -r requirements.txt && \ -python setup.py install +pip3 install -r requirements.txt && \ +python3 setup.py install CMD ["/bin/bash"] diff --git a/redfish-client/tests/debian-8-src-p2.dkf b/redfish-client/tests/debian-11-src-p3.dkf similarity index 79% rename from redfish-client/tests/debian-8-src-p2.dkf rename to redfish-client/tests/debian-11-src-p3.dkf index a1ccfc6..cf36cba 100644 --- a/redfish-client/tests/debian-8-src-p2.dkf +++ b/redfish-client/tests/debian-11-src-p3.dkf @@ -1,8 +1,8 @@ -FROM debian:8 +FROM debian:11 ENV DEBIAN_FRONTEND noninteractive RUN apt-get update && \ apt-get install -y apt-utils && \ -apt-get install -y python-pip +apt-get install -y python3-pip COPY python-redfish.src.tar.gz /python-redfish.src.tar.gz RUN mkdir /var/log/python-redfish RUN tar xvvf python-redfish.src.tar.gz @@ -10,7 +10,7 @@ RUN tar xvvf python-redfish.src.tar.gz # configparser>=3.3.0; python_version < '3' in requirements.txt RUN pip install --upgrade setuptools RUN cd python-redfish* && \ -pip install -r requirements.txt && \ -python setup.py install +pip3 install -r requirements.txt && \ +python3 setup.py install CMD ["/bin/bash"] diff --git a/redfish-client/tests/fedora-25-src-p2.dkf b/redfish-client/tests/fedora-25-src-p2.dkf deleted file mode 100644 index a0c1ad2..0000000 --- a/redfish-client/tests/fedora-25-src-p2.dkf +++ /dev/null @@ -1,10 +0,0 @@ -FROM fedora:25 -RUN dnf install -y python-pip && \ -dnf install -y tar -COPY python-redfish.src.tar.gz /python-redfish.src.tar.gz -RUN mkdir /var/log/python-redfish -RUN tar xvvf python-redfish.src.tar.gz -RUN cd python-redfish* && \ -pip install -r requirements.txt && \ -python setup.py install -CMD ["/bin/bash"] diff --git a/redfish-client/tests/fedora-25-pip-p2.dkf b/redfish-client/tests/fedora-35-pip-p3.dkf similarity index 88% rename from redfish-client/tests/fedora-25-pip-p2.dkf rename to redfish-client/tests/fedora-35-pip-p3.dkf index 3e2aee5..0dc1826 100644 --- a/redfish-client/tests/fedora-25-pip-p2.dkf +++ b/redfish-client/tests/fedora-35-pip-p3.dkf @@ -1,4 +1,4 @@ -FROM fedora:25 +FROM fedora:35 RUN dnf install -y python-pip RUN mkdir /var/log/python-redfish RUN pip install python-redfish --pre diff --git a/redfish-client/tests/fedora-25-src-p3.dkf b/redfish-client/tests/fedora-35-src-p3.dkf similarity index 74% rename from redfish-client/tests/fedora-25-src-p3.dkf rename to redfish-client/tests/fedora-35-src-p3.dkf index 8f86378..585974c 100644 --- a/redfish-client/tests/fedora-25-src-p3.dkf +++ b/redfish-client/tests/fedora-35-src-p3.dkf @@ -1,9 +1,10 @@ -FROM fedora:25 +FROM fedora:35 RUN dnf install -y python3-pip && \ dnf install -y tar COPY python-redfish.src.tar.gz /python-redfish.src.tar.gz RUN mkdir /var/log/python-redfish -RUN tar xvvf python-redfish.src.tar.gz +RUN tar xvzf python-redfish.src.tar.gz +RUN rm python-redfish.src.tar.gz RUN cd python-redfish* && \ pip3 install -r requirements.txt && \ python3 setup.py install diff --git a/redfish-client/tests/test_client.py b/redfish-client/tests/test_client.py index 083d1fd..2406a95 100644 --- a/redfish-client/tests/test_client.py +++ b/redfish-client/tests/test_client.py @@ -81,28 +81,26 @@ def test_dockerbuild(): docker = DockerTest() # Warning : Image tag is derived from file name, do not use uppercase !!! # because docker image tags can not use uppercase so far. - dockerfiles = ('redfish-client/tests/ubuntu-16.04-src-p2.dkf', - 'redfish-client/tests/debian-8-src-p2.dkf', - 'redfish-client/tests/centos-7-src-p2.dkf', - 'redfish-client/tests/fedora-25-src-p2.dkf', - 'redfish-client/tests/fedora-25-src-p3.dkf', - 'redfish-client/tests/fedora-25-pip-p2.dkf',) + dockerfiles = ('redfish-client/tests/ubuntu-20.04-src-p3.dkf', + 'redfish-client/tests/debian-11-src-p3.dkf', + 'redfish-client/tests/centos-7-src-p3.dkf', + 'redfish-client/tests/fedora-35-src-p3.dkf', + 'redfish-client/tests/fedora-35-pip-p3.dkf',) for dockerfile in dockerfiles: print('Testing : {}'.format(dockerfile)) response = docker.build(dockerfile) - status = str(response.pop()) - assert 'Successfully built' in status + status = str(response[-2]) + assert 'Successfully built' in status, f"error with {dockerfile} : {status}" @local_docker def test_install(): docker = DockerTest() - images = ('rf-ubuntu-16.04-src-p2', - 'rf-debian-8-src-p2', - 'rf-centos-7-src-p2', - 'rf-fedora-25-src-p2', - 'rf-fedora-25-src-p3', - 'rf-fedora-25-pip-p2') + images = ('rf-ubuntu-20.04-src-p3', + 'rf-debian-11-src-p3', + 'rf-centos-7-src-p3', + 'rf-fedora-35-src-p3', + 'rf-fedora-35-pip-p3') for img in images: print('Testing : {}'.format(img)) response = docker.run(img, 'redfish-client config showall') @@ -113,12 +111,11 @@ def test_install(): @local_docker def test_versionformat(): docker = DockerTest() - images = ('rf-ubuntu-16.04-src-p2', - 'rf-debian-8-src-p2', - 'rf-centos-7-src-p2', - 'rf-fedora-25-src-p2', - 'rf-fedora-25-src-p3', - 'rf-fedora-25-pip-p2') + images = ('rf-ubuntu-20.04-src-p3', + 'rf-debian-11-src-p3', + 'rf-centos-7-src-p3', + 'rf-fedora-35-src-p3', + 'rf-fedora-35-pip-p3') for img in images: print('Testing : {}'.format(img)) response = docker.run(img, 'redfish-client --version') diff --git a/redfish-client/tests/ubuntu-16.04-src-p2.dkf b/redfish-client/tests/ubuntu-20.04-src-p3.dkf similarity index 79% rename from redfish-client/tests/ubuntu-16.04-src-p2.dkf rename to redfish-client/tests/ubuntu-20.04-src-p3.dkf index 87d61ce..6981992 100644 --- a/redfish-client/tests/ubuntu-16.04-src-p2.dkf +++ b/redfish-client/tests/ubuntu-20.04-src-p3.dkf @@ -1,16 +1,16 @@ -FROM ubuntu:16.04 +FROM ubuntu:20.04 ENV DEBIAN_FRONTEND noninteractive RUN apt-get update && \ apt-get install -y apt-utils && \ -apt-get install -y python-pip +apt-get install -y python3-pip COPY python-redfish.src.tar.gz /python-redfish.src.tar.gz RUN mkdir /var/log/python-redfish RUN tar xvvf python-redfish.src.tar.gz # Need a really recent version of setuptools to support # configparser>=3.3.0; python_version < '3' in requirements.txt -RUN pip install --upgrade setuptools +# RUN pip install --upgrade setuptools RUN cd python-redfish* && \ pip install -r requirements.txt && \ -python setup.py install +python3 setup.py install CMD ["/bin/bash"]