summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuke Meyer <lmeyer@redhat.com>2017-03-30 13:11:45 -0400
committerLuke Meyer <lmeyer@redhat.com>2017-04-25 12:16:20 -0400
commitce4c2f0cc0b4766eff28f5fa91eb353301ad9c91 (patch)
treef76e4690a1a82984742f9f0ff9e776544d74ec4e
parent75f0c57654429d3b861d792169a9c1bdf9156bf8 (diff)
downloadopenshift-ce4c2f0cc0b4766eff28f5fa91eb353301ad9c91.tar.gz
openshift-ce4c2f0cc0b4766eff28f5fa91eb353301ad9c91.tar.bz2
openshift-ce4c2f0cc0b4766eff28f5fa91eb353301ad9c91.tar.xz
openshift-ce4c2f0cc0b4766eff28f5fa91eb353301ad9c91.zip
preflight int tests: define image builds to support tests
-rw-r--r--test/integration/openshift_health_checker/builds/Dockerfile.test-target-base2
-rw-r--r--test/integration/openshift_health_checker/builds/aos-package-checks/Dockerfile30
-rw-r--r--test/integration/openshift_health_checker/builds/aos-package-checks/root/etc/yum.repos.d/break-yum.repo5
-rw-r--r--test/integration/openshift_health_checker/builds/aos-package-checks/root/etc/yum.repos.d/ose-3.2.repo5
-rw-r--r--test/integration/openshift_health_checker/builds/aos-package-checks/root/etc/yum.repos.d/ose-3.3.repo5
-rw-r--r--test/integration/openshift_health_checker/builds/aos-package-checks/root/root/break-yum-update-2.spec33
-rw-r--r--test/integration/openshift_health_checker/builds/aos-package-checks/root/root/break-yum-update.spec32
-rw-r--r--test/integration/openshift_health_checker/builds/aos-package-checks/root/root/ose-3.2.spec44
-rw-r--r--test/integration/openshift_health_checker/builds/aos-package-checks/root/root/ose-3.3.spec44
-rw-r--r--test/integration/openshift_health_checker/builds/build-container-images.yml19
10 files changed, 219 insertions, 0 deletions
diff --git a/test/integration/openshift_health_checker/builds/Dockerfile.test-target-base b/test/integration/openshift_health_checker/builds/Dockerfile.test-target-base
new file mode 100644
index 000000000..39b33c057
--- /dev/null
+++ b/test/integration/openshift_health_checker/builds/Dockerfile.test-target-base
@@ -0,0 +1,2 @@
+FROM centos/systemd
+RUN yum install -y iproute python-dbus PyYAML yum-utils
diff --git a/test/integration/openshift_health_checker/builds/aos-package-checks/Dockerfile b/test/integration/openshift_health_checker/builds/aos-package-checks/Dockerfile
new file mode 100644
index 000000000..8542029f6
--- /dev/null
+++ b/test/integration/openshift_health_checker/builds/aos-package-checks/Dockerfile
@@ -0,0 +1,30 @@
+FROM test-target-base
+
+RUN yum install -y rpm-build rpmdevtools createrepo && \
+ rpmdev-setuptree && \
+ mkdir -p /mnt/localrepo
+ADD root /
+
+# we will build some RPMs that can be used to break yum update in tests.
+RUN cd /root/rpmbuild/SOURCES && \
+ mkdir break-yum-update-1.0 && \
+ tar zfc foo.tgz break-yum-update-1.0 && \
+ rpmbuild -bb /root/break-yum-update.spec && \
+ yum install -y /root/rpmbuild/RPMS/noarch/break-yum-update-1.0-1.noarch.rpm && \
+ rpmbuild -bb /root/break-yum-update-2.spec && \
+ mkdir /mnt/localrepo/break-yum && \
+ cp /root/rpmbuild/RPMS/noarch/break-yum-update-1.0-2.noarch.rpm /mnt/localrepo/break-yum && \
+ createrepo /mnt/localrepo/break-yum
+
+# we'll also build some RPMs that can be used to exercise OCP package version tests.
+RUN cd /root/rpmbuild/SOURCES && \
+ mkdir atomic-openshift-3.2 && \
+ mkdir atomic-openshift-3.3 && \
+ tar zfc ose.tgz atomic-openshift-3.{2,3} && \
+ rpmbuild -bb /root/ose-3.2.spec && \
+ rpmbuild -bb /root/ose-3.3.spec && \
+ mkdir /mnt/localrepo/ose-3.{2,3} && \
+ cp /root/rpmbuild/RPMS/noarch/atomic-openshift*-3.2-1.noarch.rpm /mnt/localrepo/ose-3.2 && \
+ createrepo /mnt/localrepo/ose-3.2 && \
+ cp /root/rpmbuild/RPMS/noarch/atomic-openshift*-3.3-1.noarch.rpm /mnt/localrepo/ose-3.3 && \
+ createrepo /mnt/localrepo/ose-3.3
diff --git a/test/integration/openshift_health_checker/builds/aos-package-checks/root/etc/yum.repos.d/break-yum.repo b/test/integration/openshift_health_checker/builds/aos-package-checks/root/etc/yum.repos.d/break-yum.repo
new file mode 100644
index 000000000..f5ccd2d19
--- /dev/null
+++ b/test/integration/openshift_health_checker/builds/aos-package-checks/root/etc/yum.repos.d/break-yum.repo
@@ -0,0 +1,5 @@
+[break-yum]
+name=break-yum
+baseurl=file:///mnt/localrepo/break-yum
+enabled=0
+gpgcheck=0
diff --git a/test/integration/openshift_health_checker/builds/aos-package-checks/root/etc/yum.repos.d/ose-3.2.repo b/test/integration/openshift_health_checker/builds/aos-package-checks/root/etc/yum.repos.d/ose-3.2.repo
new file mode 100644
index 000000000..3064d6dbb
--- /dev/null
+++ b/test/integration/openshift_health_checker/builds/aos-package-checks/root/etc/yum.repos.d/ose-3.2.repo
@@ -0,0 +1,5 @@
+[ose-3.2]
+name=ose-3.2
+baseurl=file:///mnt/localrepo/ose-3.2
+enabled=0
+gpgcheck=0
diff --git a/test/integration/openshift_health_checker/builds/aos-package-checks/root/etc/yum.repos.d/ose-3.3.repo b/test/integration/openshift_health_checker/builds/aos-package-checks/root/etc/yum.repos.d/ose-3.3.repo
new file mode 100644
index 000000000..1466da476
--- /dev/null
+++ b/test/integration/openshift_health_checker/builds/aos-package-checks/root/etc/yum.repos.d/ose-3.3.repo
@@ -0,0 +1,5 @@
+[ose-3.3]
+name=ose-3.3
+baseurl=file:///mnt/localrepo/ose-3.3
+enabled=0
+gpgcheck=0
diff --git a/test/integration/openshift_health_checker/builds/aos-package-checks/root/root/break-yum-update-2.spec b/test/integration/openshift_health_checker/builds/aos-package-checks/root/root/break-yum-update-2.spec
new file mode 100644
index 000000000..ebd7eb443
--- /dev/null
+++ b/test/integration/openshift_health_checker/builds/aos-package-checks/root/root/break-yum-update-2.spec
@@ -0,0 +1,33 @@
+Name: break-yum-update
+Version: 1.0
+Release: 2
+Summary: Package for breaking updates by requiring things that don't exist
+
+License: NA
+
+Requires: package-that-does-not-exist
+Source0: http://example.com/foo.tgz
+BuildArch: noarch
+
+%description
+Package for breaking updates by requiring things that don't exist
+
+
+%prep
+%setup -q
+
+
+%build
+
+
+%install
+rm -rf $RPM_BUILD_ROOT
+mkdir -p $RPM_BUILD_ROOT
+
+
+%files
+%doc
+
+
+
+%changelog
diff --git a/test/integration/openshift_health_checker/builds/aos-package-checks/root/root/break-yum-update.spec b/test/integration/openshift_health_checker/builds/aos-package-checks/root/root/break-yum-update.spec
new file mode 100644
index 000000000..c40675f90
--- /dev/null
+++ b/test/integration/openshift_health_checker/builds/aos-package-checks/root/root/break-yum-update.spec
@@ -0,0 +1,32 @@
+Name: break-yum-update
+Version: 1.0
+Release: 1
+Summary: Package for breaking updates by requiring things that don't exist
+
+License: NA
+
+Source0: http://example.com/foo.tgz
+BuildArch: noarch
+
+%description
+Package for breaking updates by requiring things that don't exist
+
+
+%prep
+%setup -q
+
+
+%build
+
+
+%install
+rm -rf $RPM_BUILD_ROOT
+mkdir -p $RPM_BUILD_ROOT
+
+
+%files
+%doc
+
+
+
+%changelog
diff --git a/test/integration/openshift_health_checker/builds/aos-package-checks/root/root/ose-3.2.spec b/test/integration/openshift_health_checker/builds/aos-package-checks/root/root/ose-3.2.spec
new file mode 100644
index 000000000..dbc9f0c8e
--- /dev/null
+++ b/test/integration/openshift_health_checker/builds/aos-package-checks/root/root/ose-3.2.spec
@@ -0,0 +1,44 @@
+Name: atomic-openshift
+Version: 3.2
+Release: 1
+Summary: package the critical aos packages
+
+License: NA
+
+Source0: http://example.com/ose.tgz
+BuildArch: noarch
+
+%package master
+Summary: package the critical aos packages
+%package node
+Summary: package the critical aos packages
+
+%description
+Package for pretending to provide AOS
+
+%description master
+Package for pretending to provide AOS
+
+%description node
+Package for pretending to provide AOS
+
+%prep
+%setup -q
+
+
+%build
+
+
+%install
+rm -rf $RPM_BUILD_ROOT
+mkdir -p $RPM_BUILD_ROOT
+
+
+%files
+%files master
+%files node
+%doc
+
+
+
+%changelog
diff --git a/test/integration/openshift_health_checker/builds/aos-package-checks/root/root/ose-3.3.spec b/test/integration/openshift_health_checker/builds/aos-package-checks/root/root/ose-3.3.spec
new file mode 100644
index 000000000..9546e8430
--- /dev/null
+++ b/test/integration/openshift_health_checker/builds/aos-package-checks/root/root/ose-3.3.spec
@@ -0,0 +1,44 @@
+Name: atomic-openshift
+Version: 3.3
+Release: 1
+Summary: package the critical aos packages
+
+License: NA
+
+Source0: http://example.com/ose.tgz
+BuildArch: noarch
+
+%package master
+Summary: package the critical aos packages
+%package node
+Summary: package the critical aos packages
+
+%description
+Package for pretending to provide AOS
+
+%description master
+Package for pretending to provide AOS
+
+%description node
+Package for pretending to provide AOS
+
+%prep
+%setup -q
+
+
+%build
+
+
+%install
+rm -rf $RPM_BUILD_ROOT
+mkdir -p $RPM_BUILD_ROOT
+
+
+%files
+%files master
+%files node
+%doc
+
+
+
+%changelog
diff --git a/test/integration/openshift_health_checker/builds/build-container-images.yml b/test/integration/openshift_health_checker/builds/build-container-images.yml
new file mode 100644
index 000000000..445d73d29
--- /dev/null
+++ b/test/integration/openshift_health_checker/builds/build-container-images.yml
@@ -0,0 +1,19 @@
+---
+- name: Build all the images we need for running integration tests
+ hosts: localhost
+ connection: local
+ tasks:
+
+ - name: test-target-base
+ docker_image:
+ state: present
+ path: ./
+ dockerfile: Dockerfile.test-target-base
+ name: test-target-base
+
+ - name: preflight-aos-package-checks
+ docker_image:
+ state: present
+ pull: no
+ path: ./aos-package-checks
+ name: preflight-aos-package-checks