@@ -59,7 +59,12 @@ func TestNSTemplateTiers(t *testing.T) {
5959 notCreatedByE2e := client.MatchingLabelsSelector {
6060 Selector : labels .NewSelector ().Add (* e2eProducer ),
6161 }
62- err = hostAwait .Client .List (context .TODO (), allTiers , client .InNamespace (hostAwait .Namespace ), notCreatedByE2e )
62+ GoTemplate , err := labels .NewRequirement ("go-template" , selection .Equals , []string {"toolchain-e2e" })
63+ require .NoError (t , err )
64+ notGoTemplate := client.MatchingLabelsSelector {
65+ Selector : labels .NewSelector ().Add (* GoTemplate ),
66+ }
67+ err = hostAwait .Client .List (context .TODO (), allTiers , client .InNamespace (hostAwait .Namespace ), notCreatedByE2e , notGoTemplate )
6368 require .NoError (t , err )
6469 assert .Len (t , allTiers .Items , len (tiersToCheck ))
6570
@@ -247,37 +252,6 @@ func setupAccounts(t *testing.T, awaitilities wait.Awaitilities, tier *tiers.Cus
247252 return userSignups
248253}
249254
250- func setupGoAccounts (t * testing.T , awaitilities wait.Awaitilities , tier * tiers.CustomNSTemplateTier , nameFmt string , targetCluster * wait.MemberAwaitility , count int ) []* toolchainv1alpha1.UserSignup {
251- // first, let's create the a new NSTemplateTier (to avoid messing with other tiers)
252- hostAwait := awaitilities .Host ()
253-
254- // let's create a few users (more than `maxPoolSize`)
255- // and wait until they are all provisioned by calling EnsureMUR()
256- userSignups := make ([]* toolchainv1alpha1.UserSignup , count )
257- for i := 0 ; i < count ; i ++ {
258- user := NewSignupRequest (awaitilities ).
259- Username (fmt .Sprintf (nameFmt , i )).
260- ManuallyApprove ().
261- WaitForMUR ().
262- UserID (uuid .Must (uuid .NewV4 ()).String ()).
263- RequireConditions (wait .ConditionSet (wait .Default (), wait .ApprovedByAdmin ())... ).
264- TargetCluster (targetCluster ).
265- Execute (t )
266- userSignups [i ] = user .UserSignup
267- }
268-
269- // let's promote to users the new tier
270- for i := range userSignups {
271-
272- VerifyResourcesProvisionedForSignup (t , awaitilities , userSignups [i ])
273-
274- username := fmt .Sprintf (nameFmt , i )
275- tiers .MoveSpaceToTier (t , hostAwait , username , tier .Name )
276- VerifyResourcesProvisionedForSignupWithTiers (t , awaitilities , userSignups [i ], "deactivate30" , "ttr-go-template" )
277- }
278- return userSignups
279- }
280-
281255func verifyResourceUpdatesForUserSignups (t * testing.T , hostAwait * wait.HostAwaitility , memberAwaitility * wait.MemberAwaitility , userSignups []* toolchainv1alpha1.UserSignup , tier * tiers.CustomNSTemplateTier ) {
282256 // if there's an annotation that describes on which other tier this one is based (for e2e tests only)
283257 for _ , usersignup := range userSignups {
0 commit comments