Skip to content

Commit

Permalink
Add Landscape check in purchase test
Browse files Browse the repository at this point in the history
  • Loading branch information
EduardGomezEscandell committed Nov 14, 2023
1 parent 1503723 commit 3bca47b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion end-to-end/purchase_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,13 @@ func TestPurchase(t *testing.T) {
for name, tc := range testCases {
tc := tc
t.Run(name, func(t *testing.T) {
ctx := context.Background()

testSetup(t)

landscape := newLandscape(t, ctx, "localhost:")
writeUbuntuProRegistry(t, "LandscapeConfig", landscape.ClientConfig())

settings := contractsmockserver.DefaultSettings()

token := os.Getenv(proTokenEnv)
Expand All @@ -66,7 +71,6 @@ func TestPurchase(t *testing.T) {
//nolint:errcheck // Nothing we can do about it
defer cs.Stop()

ctx := context.Background()
contractsCtx, contractsCancel := context.WithCancel(ctx)
defer contractsCancel()

Expand Down Expand Up @@ -145,6 +149,8 @@ func TestPurchase(t *testing.T) {
}
return attached
}, maxTimeout, time.Second, "distro should have been Pro attached")

landscape.RequireFinalTestChecks(t, ctx, os.Getenv(proTokenEnv), d)
})
}
}

0 comments on commit 3bca47b

Please sign in to comment.