12
									
								
								redfish-client/tests/Dockerfile.centos
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										12
									
								
								redfish-client/tests/Dockerfile.centos
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +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
 | 
			
		||||
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 cd python-redfish* && \
 | 
			
		||||
pip install -r requirements.txt && \
 | 
			
		||||
python setup.py install
 | 
			
		||||
CMD ["/bin/bash"]
 | 
			
		||||
@@ -1,17 +1,18 @@
 | 
			
		||||
# coding=utf-8
 | 
			
		||||
 | 
			
		||||
from __future__ import unicode_literals
 | 
			
		||||
from __future__ import print_function
 | 
			
		||||
from __future__ import division
 | 
			
		||||
from __future__ import absolute_import
 | 
			
		||||
from future import standard_library
 | 
			
		||||
standard_library.install_aliases()
 | 
			
		||||
from builtins import object
 | 
			
		||||
# coding=utf-8
 | 
			
		||||
import os
 | 
			
		||||
import stat
 | 
			
		||||
import subprocess
 | 
			
		||||
import re
 | 
			
		||||
from docker import Client
 | 
			
		||||
from path import Path
 | 
			
		||||
standard_library.install_aliases()
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
class DockerTest(object):
 | 
			
		||||
@@ -68,6 +69,7 @@ def test_dockerbuild():
 | 
			
		||||
    # Warning :  Image tag is derived from file name, do not use uppercase !!!
 | 
			
		||||
    dockerfiles = ('redfish-client/tests/Dockerfile.ubuntu',
 | 
			
		||||
                   'redfish-client/tests/Dockerfile.debian',
 | 
			
		||||
                   'redfish-client/tests/Dockerfile.centos',
 | 
			
		||||
                   'redfish-client/tests/Dockerfile.fedora',
 | 
			
		||||
                   'redfish-client/tests/Dockerfile.fedorap3',
 | 
			
		||||
                   'redfish-client/tests/Dockerfile.fedorapip')
 | 
			
		||||
@@ -80,7 +82,7 @@ def test_dockerbuild():
 | 
			
		||||
 | 
			
		||||
def test_install():
 | 
			
		||||
    docker = DockerTest()
 | 
			
		||||
    images = ('rfubuntu', 'rfdebian',
 | 
			
		||||
    images = ('rfubuntu', 'rfdebian', 'rfcentos',
 | 
			
		||||
              'rffedora', 'rffedorap3', 'rffedorapip')
 | 
			
		||||
    for img in images:
 | 
			
		||||
        print('Testing : {}'.format(img))
 | 
			
		||||
@@ -91,7 +93,7 @@ def test_install():
 | 
			
		||||
 | 
			
		||||
def test_versionformat():
 | 
			
		||||
    docker = DockerTest()
 | 
			
		||||
    images = ('rfubuntu', 'rfdebian',
 | 
			
		||||
    images = ('rfubuntu', 'rfdebian', 'rfcentos',
 | 
			
		||||
              'rffedora', 'rffedorap3', 'rffedorapip')
 | 
			
		||||
    for img in images:
 | 
			
		||||
        print('Testing : {}'.format(img))
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user