Skip to content

Commit c7a5c50

Browse files
committed
Add image-based installation ISO integration tests
Signed-off-by: Michail Resvanis <[email protected]>
1 parent 8453641 commit c7a5c50

File tree

8 files changed

+147
-0
lines changed

8 files changed

+147
-0
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Verify that the most relevant assets are properly generated in the installation ISO
2+
3+
exec openshift-install image-based create image --dir $WORK
4+
5+
exists $WORK/rhcos-ibi.iso
6+
7+
ignitionImgContains rhcos-ibi.iso config.ign
8+
9+
-- image-based-installation-config.yaml --
10+
apiVersion: v1beta1
11+
kind: ImageBasedInstallationConfig
12+
metadata:
13+
name: example-image-based-installation-config
14+
seedImage: quay.io/openshift-kni/seed-image:4.16.0
15+
seedVersion: 4.16.0
16+
installationDisk: /dev/vda
17+
pullSecret: '{"auths": {"quay.io": {"auth": "c3VwZXItc2VjcmV0Cg=="}}}'
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
! exec openshift-install image-based create image --dir $WORK
2+
3+
stderr 'imageDigestSources\[0\].source: Invalid value: "": failed to parse: invalid reference format'
4+
5+
! exists $WORK/rhcos-ibi.iso
6+
7+
-- image-based-installation-config.yaml --
8+
apiVersion: v1beta1
9+
kind: ImageBasedInstallationConfig
10+
metadata:
11+
name: example-image-based-installation-config
12+
seedImage: quay.io/openshift-kni/seed-image:4.16.0
13+
seedVersion: 4.16.0
14+
installationDisk: /dev/vda
15+
pullSecret: '{"auths": {"quay.io": {"auth": "c3VwZXItc2VjcmV0Cg=="}}}'
16+
imageDigestSources:
17+
- source: ""
18+
mirrors: []
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
! exec openshift-install image-based create image --dir $WORK
2+
3+
stderr 'proxy.httpProxy: Invalid value: "localhost": parse "localhost": invalid URI for request'
4+
5+
! exists $WORK/rhcos-ibi.iso
6+
7+
-- image-based-installation-config.yaml --
8+
apiVersion: v1beta1
9+
kind: ImageBasedInstallationConfig
10+
metadata:
11+
name: example-image-based-installation-config
12+
seedImage: quay.io/openshift-kni/seed-image:4.16.0
13+
seedVersion: 4.16.0
14+
installationDisk: /dev/vda
15+
pullSecret: '{"auths": {"quay.io": {"auth": "c3VwZXItc2VjcmV0Cg=="}}}'
16+
proxy:
17+
httpProxy: localhost
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
! exec openshift-install image-based create image --dir $WORK
2+
3+
stderr 'Required value: you must specify an installationDisk'
4+
5+
! exists $WORK/rhcos-ibi.iso
6+
7+
-- image-based-installation-config.yaml --
8+
apiVersion: v1beta1
9+
kind: ImageBasedInstallationConfig
10+
metadata:
11+
name: example-image-based-installation-config
12+
seedImage: quay.io/openshift-kni/seed-image:4.16.0
13+
seedVersion: 4.16.0
14+
pullSecret: '{"auths": {"quay.io": {"auth": "c3VwZXItc2VjcmV0Cg=="}}}'
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
! exec openshift-install image-based create image --dir $WORK
2+
3+
stderr 'Required value: you must specify a pullSecret'
4+
5+
! exists $WORK/rhcos-ibi.iso
6+
7+
-- image-based-installation-config.yaml --
8+
apiVersion: v1beta1
9+
kind: ImageBasedInstallationConfig
10+
metadata:
11+
name: example-image-based-installation-config
12+
seedImage: quay.io/openshift-kni/seed-image:4.16.0
13+
seedVersion: 4.16.0
14+
installationDisk: /dev/vda
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
! exec openshift-install image-based create image --dir $WORK
2+
3+
stderr 'Required value: you must specify a seedImage'
4+
5+
! exists $WORK/rhcos-ibi.iso
6+
7+
-- image-based-installation-config.yaml --
8+
apiVersion: v1beta1
9+
kind: ImageBasedInstallationConfig
10+
metadata:
11+
name: example-image-based-installation-config
12+
seedVersion: 4.16.0
13+
installationDisk: /dev/vda
14+
pullSecret: '{"auths": {"quay.io": {"auth": "c3VwZXItc2VjcmV0Cg=="}}}'
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
! exec openshift-install image-based create image --dir $WORK
2+
3+
stderr 'Required value: you must specify a seedVersion'
4+
5+
! exists $WORK/rhcos-ibi.iso
6+
7+
-- image-based-installation-config.yaml --
8+
apiVersion: v1beta1
9+
kind: ImageBasedInstallationConfig
10+
metadata:
11+
name: example-image-based-installation-config
12+
seedImage: quay.io/openshift-kni/seed-image:4.16.0
13+
installationDisk: /dev/vda
14+
pullSecret: '{"auths": {"quay.io": {"auth": "c3VwZXItc2VjcmV0Cg=="}}}'
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Verify the generated default template for image-based-installation-config.yaml
2+
3+
exec openshift-install image-based create image-config-template --dir $WORK
4+
5+
stderr 'level=info msg=Image-Config-Template created in:'
6+
7+
exists $WORK/image-based-installation-config.yaml
8+
9+
cmp $WORK/image-based-installation-config.yaml $WORK/expected/image-based-installation-config.yaml
10+
11+
-- expected/image-based-installation-config.yaml --
12+
#
13+
# Note: This is a sample ImageBasedInstallationConfig file showing
14+
# which fields are available to aid you in creating your
15+
# own image-based-installation-config.yaml file.
16+
#
17+
apiVersion: v1beta1
18+
kind: ImageBasedInstallationConfig
19+
metadata:
20+
name: example-image-based-installation-config
21+
# The following fields are required
22+
seedImage: quay.io/openshift-kni/seed-image:4.16.0
23+
seedVersion: 4.16.0
24+
installationDisk: /dev/vda
25+
pullSecret: '<your-pull-secret>'
26+
# networkConfig is optional and contains the network configuration for the host in NMState format.
27+
# See https://nmstate.io/examples.html for examples.
28+
# networkConfig:
29+
# interfaces:
30+
# - name: eth0
31+
# type: ethernet
32+
# state: up
33+
# mac-address: 00:00:00:00:00:00
34+
# ipv4:
35+
# enabled: true
36+
# address:
37+
# - ip: 192.168.122.2
38+
# prefix-length: 23
39+
# dhcp: false

0 commit comments

Comments
 (0)