diff --git a/pkg/build/compile.go b/pkg/build/compile.go index a2351dcde..517b4c5d8 100644 --- a/pkg/build/compile.go +++ b/pkg/build/compile.go @@ -75,7 +75,7 @@ func (t *Test) Compile(ctx context.Context) error { // Append the subpackage that we're testing to be installed. version := fmt.Sprintf("%s-r%d", t.Configuration.Package.Version, t.Configuration.Package.Epoch) - te.Packages = append(te.Packages, sp.Name+"="+version) + te.Packages = append(te.Packages, sp.Name+"~"+version) if err := test.CompilePipelines(ctx, sm, sp.Test.Pipeline); err != nil { return fmt.Errorf("compiling subpackage %q tests: %w", sp.Name, err) @@ -97,7 +97,7 @@ func (t *Test) Compile(ctx context.Context) error { te.Packages = append(te.Packages, t.Package) } else { version := fmt.Sprintf("%s-r%d", t.Configuration.Package.Version, t.Configuration.Package.Epoch) - te.Packages = append(te.Packages, t.Configuration.Package.Name+"="+version) + te.Packages = append(te.Packages, t.Configuration.Package.Name+"~"+version) } if err := test.CompilePipelines(ctx, sm, cfg.Test.Pipeline); err != nil { diff --git a/pkg/build/compile_test.go b/pkg/build/compile_test.go index ad70084ef..08dd0cb65 100644 --- a/pkg/build/compile_test.go +++ b/pkg/build/compile_test.go @@ -111,11 +111,11 @@ func TestCompileTest(t *testing.T) { t.Fatalf("unexpected error: %v", err) } - if got, want := test.Configuration.Test.Environment.Contents.Packages, []string{"main-base", "main=1.2.3-r4", "main-need"}; !slices.Equal(got, want) { + if got, want := test.Configuration.Test.Environment.Contents.Packages, []string{"main-base", "main~1.2.3-r4", "main-need"}; !slices.Equal(got, want) { t.Errorf("main test packages: want %v, got %v", want, got) } - if got, want := test.Configuration.Subpackages[0].Test.Environment.Contents.Packages, []string{"subpackage-base", "subpackage=1.2.3-r4", "subpackage-need"}; !slices.Equal(got, want) { + if got, want := test.Configuration.Subpackages[0].Test.Environment.Contents.Packages, []string{"subpackage-base", "subpackage~1.2.3-r4", "subpackage-need"}; !slices.Equal(got, want) { t.Errorf("subpackage test packages: want %v, got %v", want, got) } }