Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RHEL 8.5: main image types #1536

Merged
merged 61 commits into from
Jul 24, 2021
Merged
Changes from 1 commit
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
7894c39
distro/rhel85: partition table generator function
achilleas-k Jul 1, 2021
0f3e51d
disk: generate fstab stage options for osbuild v2
achilleas-k Jul 1, 2021
f7d8ffd
distro/rhel85: introduce the qcow2 image type
achilleas-k Jun 29, 2021
f835937
distro/rhel85: add grub2 stage options
achilleas-k Jul 1, 2021
25bd06c
distro/rhel85: document selinuxStageOptions arg
achilleas-k Jul 5, 2021
d11dc05
distro/rhel85: split coreStages() implementation
achilleas-k Jul 5, 2021
e292245
osbuild2: new stages and osbuild features
achilleas-k Jul 6, 2021
5f4fca0
osbuild2: separate input base types into new file
achilleas-k Jul 6, 2021
0d4e6f1
distro/rhel85: add image and qcow pipelines
achilleas-k Jul 6, 2021
e501360
distro/rhel85: tidy up package sets
achilleas-k Jul 7, 2021
50c648b
distro/rhel85: remove installer type for aarch64
achilleas-k Jul 7, 2021
95ba139
distro/rhel85: introduce the vhd image type
achilleas-k Jul 7, 2021
f96a881
distro/rhel85: add dhcp-client to vhd packages
achilleas-k Jul 7, 2021
86ef640
distro/rhel85: introduce the vmdk image type
achilleas-k Jul 7, 2021
f47ef7b
distro/rhel85: introduce the openstack image type
achilleas-k Jul 7, 2021
46a4497
CI: enable base tests on RHEL 8.5
achilleas-k Jul 7, 2021
4957755
distro/rhel85: partition table fixes
achilleas-k Jul 7, 2021
05794c4
test/data: add aarch64 repos for RHEL 8.5
achilleas-k Jul 8, 2021
c5eef0c
distro/rhel85: simplify edge types and package sets
achilleas-k Jul 8, 2021
e247574
distro/rhel85: aarch64 uefi: true
achilleas-k Jul 8, 2021
6733272
distro/rhel85: don't always install bootloader
achilleas-k Jul 8, 2021
80a35e9
distro/rhel85: introduce the ami image type
achilleas-k Jul 7, 2021
ba17dea
distro/rhel85: update ami package set
achilleas-k Jul 9, 2021
509fa11
distro/rhel85: update unit tests
achilleas-k Jul 7, 2021
f9eb775
CI: remove rhel-8.4 runner for base tests
achilleas-k Jul 12, 2021
9278ee9
rhel85: depsolve blueprint packages separately
achilleas-k Jul 12, 2021
b0ed83a
common: helper function for uint64 ptr
achilleas-k Jul 12, 2021
eba353e
osbuild2: unit tests for new stages
achilleas-k Jul 12, 2021
ec7a200
test: separate regression from base tests
achilleas-k Jul 13, 2021
351e571
test: regression test installing excluded dependency
achilleas-k Jul 13, 2021
8c15a1a
tools/test-case-generators: update distro map
achilleas-k Jul 13, 2021
de1a634
qemu stage test squash
achilleas-k Jul 13, 2021
71665e2
disk: boot partition finder as partitiontable method
achilleas-k Jul 13, 2021
0d2bd5c
distro/rhel85: const strings for package set keys
achilleas-k Jul 13, 2021
02ae990
test/cases: stop the spread of the tet typo
achilleas-k Jul 14, 2021
89f0e04
ci: enable all RHEL 8.5 tests
ondrejbudai Jul 14, 2021
654b61d
test/api: add RHEL 8.5 case
ondrejbudai Jul 14, 2021
2286940
distro/rhel85: fix name of exported pipeline
ondrejbudai Jul 14, 2021
939b66d
distro/rhel85: handle subscriptions only once in the pipeline
ondrejbudai Jul 15, 2021
88a7791
test/libvirt: run the uefi test also for 8.5
ondrejbudai Jul 15, 2021
e07d8cb
tests/rhel8.5: use nightly composes instead of development ones
ondrejbudai Jul 16, 2021
e2856fc
distro/rhel85: don't copy architecture when adding it to a distro
thozza Jul 16, 2021
22784d0
distro/rhel85: refactor TestFilenameFromType test
thozza Jul 16, 2021
0fb744e
distro/rhel85: add image type aliases for EDGE image types
thozza Jul 15, 2021
037f591
osbuild2: specify mounts as an array
ondrejbudai Jul 20, 2021
43d6809
distro/rhel85: sort mounts
ondrejbudai Jul 20, 2021
8dbaefe
distro/rhel85: package set key consts in pipelines
achilleas-k Jul 20, 2021
5ff2513
distro/rhel85: add blueprint pkgs to ostree pipeline
achilleas-k Jul 20, 2021
7513b09
distro/rhel85: init mounts array to 0 elements
achilleas-k Jul 20, 2021
ce9ddf5
osbuild2: base device options are optional
achilleas-k Jul 20, 2021
21f9263
tools: flush print in test case generator
achilleas-k Jul 21, 2021
f962fd5
distro/rhel85: remove broken arch-imgType combo check
achilleas-k Jul 21, 2021
d9c63d7
test/api.sh: more robust edge commit validation
achilleas-k Jul 21, 2021
f9e21c4
test/api.sh: suppress shellcheck for sudo redirect
achilleas-k Jul 22, 2021
0498cdb
distro/rhel85: add kernel to main OS package set
achilleas-k Jul 22, 2021
afa0edb
Schutzfile: bump osbuild for RHEL 8.5
ondrejbudai Jul 14, 2021
003ce1f
distro/rhel85: fix edge-installer build packages
achilleas-k Jul 23, 2021
72f173b
test/data: generate x86_64 test manifests
achilleas-k Jul 7, 2021
c96d1b1
test/data: generate aarch64 test manifests
achilleas-k Jul 7, 2021
5d27b5b
news: add entry about RHEL 8.5 images
achilleas-k Jul 12, 2021
57de030
schutzbot/deploy.sh: dependency bug workaround
achilleas-k Jul 23, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
distro/rhel85: refactor TestFilenameFromType test
Refactor data structures used for test cases in the
`TestFilenameFromType()` to have more descriptive names.

Signed-off-by: Tomas Hozza <[email protected]>
thozza authored and achilleas-k committed Jul 23, 2021

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit 22784d0df36e5c3fcef5c0bf2cb9e04ca809cd1c
126 changes: 76 additions & 50 deletions internal/distro/rhel85/distro_test.go
Original file line number Diff line number Diff line change
@@ -28,65 +28,92 @@ func TestFilenameFromType(t *testing.T) {
type args struct {
outputFormat string
}
type wantResult struct {
filename string
mimeType string
wantErr bool
}
tests := []struct {
name string
args args
want string
want1 string
wantErr bool
name string
args args
want wantResult
}{
{
name: "qcow2",
args: args{"qcow2"},
want: "disk.qcow2",
want1: "application/x-qemu-disk",
name: "qcow2",
args: args{"qcow2"},
want: wantResult{
filename: "disk.qcow2",
mimeType: "application/x-qemu-disk",
},
},
{
name: "openstack",
args: args{"openstack"},
want: "disk.qcow2",
want1: "application/x-qemu-disk",
name: "openstack",
args: args{"openstack"},
want: wantResult{
filename: "disk.qcow2",
mimeType: "application/x-qemu-disk",
},
},
{
name: "vhd",
args: args{"vhd"},
want: "disk.vhd",
want1: "application/x-vhd",
name: "vhd",
args: args{"vhd"},
want: wantResult{
filename: "disk.vhd",
mimeType: "application/x-vhd",
},
},
{
name: "vmdk",
args: args{"vmdk"},
want: "disk.vmdk",
want1: "application/x-vmdk",
name: "vmdk",
args: args{"vmdk"},
want: wantResult{
filename: "disk.vmdk",
mimeType: "application/x-vmdk",
},
},
{
name: "tar",
args: args{"tar"},
want: "root.tar.xz",
want1: "application/x-tar",
name: "tar",
args: args{"tar"},
want: wantResult{
filename: "root.tar.xz",
mimeType: "application/x-tar",
},
},
{
name: "tar-installer",
args: args{"tar-installer"},
want: "installer.iso",
want1: "application/x-iso9660-image",
name: "tar-installer",
args: args{"tar-installer"},
want: wantResult{
filename: "installer.iso",
mimeType: "application/x-iso9660-image",
},
},
{
name: "edge-container",
args: args{"edge-container"},
want: "container.tar",
want1: "application/x-tar",
name: "edge-commit",
args: args{"edge-commit"},
want: wantResult{
filename: "commit.tar",
mimeType: "application/x-tar",
},
},
{
name: "edge-container",
args: args{"edge-container"},
want: wantResult{
filename: "container.tar",
mimeType: "application/x-tar",
},
},
{
name: "edge-installer",
args: args{"edge-installer"},
want: "installer.iso",
want1: "application/x-iso9660-image",
name: "edge-installer",
args: args{"edge-installer"},
want: wantResult{
filename: "installer.iso",
mimeType: "application/x-iso9660-image",
},
},
{
name: "invalid-output-type",
args: args{"foobar"},
wantErr: true,
name: "invalid-output-type",
args: args{"foobar"},
want: wantResult{wantErr: true},
},
}
for _, dist := range rhelFamilyDistros {
@@ -96,22 +123,21 @@ func TestFilenameFromType(t *testing.T) {
dist := dist.distro
arch, _ := dist.GetArch("x86_64")
imgType, err := arch.GetImageType(tt.args.outputFormat)
if (err != nil) != tt.wantErr {
t.Errorf("Arch.GetImageType() error = %v, wantErr %v", err, tt.wantErr)
if (err != nil) != tt.want.wantErr {
t.Errorf("Arch.GetImageType() error = %v, wantErr %v", err, tt.want.wantErr)
return
}
if !tt.wantErr {
got := imgType.Filename()
got1 := imgType.MIMEType()
if got != tt.want {
t.Errorf("ImageType.Filename() got = %v, want %v", got, tt.want)
if !tt.want.wantErr {
gotFilename := imgType.Filename()
gotMIMEType := imgType.MIMEType()
if gotFilename != tt.want.filename {
t.Errorf("ImageType.Filename() got = %v, want %v", gotFilename, tt.want.filename)
}
if got1 != tt.want1 {
t.Errorf("ImageType.MIMEType() got1 = %v, want %v", got1, tt.want1)
if gotMIMEType != tt.want.mimeType {
t.Errorf("ImageType.MIMEType() got1 = %v, want %v", gotMIMEType, tt.want.mimeType)
}
}
})

}
})
}