RHEL-90: add gce image type

Add the `gce` image type intended for Google Compute Engine. The image
is BYOS - bring your own subscription and requires registering in order
to access Red Hat content.

Signed-off-by: Tomas Hozza <thozza@redhat.com>
This commit is contained in:
Tomas Hozza 2021-12-21 20:52:01 +01:00 committed by Tom Gundersen
parent ea3e6f072e
commit 5d27b7c784
16 changed files with 24367 additions and 1 deletions

View file

@ -1,6 +1,7 @@
package rpmmdtests
import (
"fmt"
"path/filepath"
"reflect"
"testing"
@ -143,3 +144,48 @@ func Test_LoadAllRepositories(t *testing.T) {
}
}
}
func TestPackageSetResolveConflictExclude(t *testing.T) {
tests := []struct {
got rpmmd.PackageSet
want rpmmd.PackageSet
}{
{
got: rpmmd.PackageSet{
Include: []string{"kernel", "microcode_ctl", "dnf"},
Exclude: []string{"microcode_ctl"},
},
want: rpmmd.PackageSet{
Include: []string{"kernel", "dnf"},
Exclude: []string{"microcode_ctl"},
},
},
{
got: rpmmd.PackageSet{
Include: []string{"kernel", "dnf"},
Exclude: []string{"microcode_ctl"},
},
want: rpmmd.PackageSet{
Include: []string{"kernel", "dnf"},
Exclude: []string{"microcode_ctl"},
},
},
{
got: rpmmd.PackageSet{
Include: []string{"kernel", "microcode_ctl", "dnf"},
Exclude: []string{},
},
want: rpmmd.PackageSet{
Include: []string{"kernel", "microcode_ctl", "dnf"},
Exclude: []string{},
},
},
}
for idx, tt := range tests {
t.Run(fmt.Sprintf("%d", idx), func(t *testing.T) {
if !reflect.DeepEqual(tt.got.ResolveConflictsExclude(), tt.want) {
t.Errorf("ResolveConflictExclude() returned unexpected result got: %#v\n want: %#v", tt.got.ResolveConflictsExclude(), tt.want)
}
})
}
}