Skip to content

Commit

Permalink
internal/statemachine: Make testing germinate less dependent on the host
Browse files Browse the repository at this point in the history
If the host is used, we cannot predict reliably the list of packages/snaps we will get after the germination.

Signed-off-by: Paul Mars <[email protected]>
  • Loading branch information
upils committed Sep 30, 2024
1 parent f2fa808 commit c7446c8
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions internal/statemachine/classic_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3479,16 +3479,16 @@ func TestGerminate(t *testing.T) {
[]string{"git://git.launchpad.net/~ubuntu-core-dev/ubuntu-seeds/+git/"},
[]string{"server", "minimal", "standard", "cloud-image"},
[]string{"python3", "sudo", "cloud-init", "ubuntu-server"},
[]string{"lxd"},
[]string{},
true,
},
{
"http",
"ubuntu",
[]string{"https://people.canonical.com/~ubuntu-archive/seeds/"},
[]string{"server", "minimal", "standard", "cloud-image"},
[]string{"server", "minimal", "standard", "cloud-image", "desktop"},
[]string{"python3", "sudo", "cloud-init", "ubuntu-server"},
[]string{"lxd"},
[]string{"thunderbird"},
false,
},
{
Expand All @@ -3500,7 +3500,7 @@ func TestGerminate(t *testing.T) {
},
[]string{"desktop", "desktop-common", "standard", "minimal"},
[]string{"xorg", "wget", "ubuntu-minimal"},
[]string{},
[]string{"thunderbird"},
true,
},
}
Expand All @@ -3520,16 +3520,16 @@ func TestGerminate(t *testing.T) {
t.Cleanup(func() { os.RemoveAll(stateMachine.stateMachineFlags.WorkDir) })

hostArch := getHostArch()
hostSuite := getHostSuite()
series := "noble"
imageDef := imagedefinition.ImageDefinition{
Architecture: hostArch,
Series: hostSuite,
Series: series,
Rootfs: &imagedefinition.Rootfs{
Flavor: tc.flavor,
Mirror: "http://archive.ubuntu.com/ubuntu/",
Seed: &imagedefinition.Seed{
SeedURLs: tc.seedURLs,
SeedBranch: hostSuite,
SeedBranch: series,
Names: tc.seedNames,
Vcs: helper.BoolPtr(tc.vcs),
},
Expand Down

0 comments on commit c7446c8

Please sign in to comment.