Skip to content

Commit ba3a54d

Browse files
rsoaresdalexeykazakovMatousJobanek
authored
test: fix space counter (codeready-toolchain#1212)
* check if space was deleted * requested changes * requested changes --------- Co-authored-by: Alexey Kazakov <alkazako@redhat.com> Co-authored-by: Matous Jobanek <mjobanek@redhat.com>
1 parent c4598f6 commit ba3a54d

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

test/migration/setup_runner.go

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,11 @@ func (r *SetupMigrationRunner) prepareDeactivatedUser(t *testing.T) {
166166
t.Logf("user signup '%s' set to deactivated", userSignup.Name)
167167

168168
// verify that MUR is deleted
169-
err = hostAwait.WaitUntilMasterUserRecordAndSpaceBindingsDeleted(t, userSignup.Status.CompliantUsername) // TODO wait for space deletion too after Space migration is done
169+
err = hostAwait.WaitUntilMasterUserRecordAndSpaceBindingsDeleted(t, userSignup.Status.CompliantUsername)
170+
require.NoError(t, err)
171+
172+
// verify that space (and space binding) is deleted, to be sure that the space counter is decremented
173+
err = hostAwait.WaitUntilSpaceAndSpaceBindingsDeleted(t, userSignup.Status.CompliantUsername)
170174
require.NoError(t, err)
171175
}
172176

@@ -185,6 +189,10 @@ func (r *SetupMigrationRunner) prepareBannedUser(t *testing.T) {
185189
_, err = hostAwait.WithRetryOptions(wait.TimeoutOption(time.Second*15)).WaitForUserSignup(t, userSignup.Name,
186190
wait.ContainsCondition(wait.Banned()[0]))
187191
require.NoError(t, err)
192+
193+
// verify that space (and space binding) is deleted, to be sure that the space counter is decremented
194+
err = hostAwait.WaitUntilSpaceAndSpaceBindingsDeleted(t, userSignup.Status.CompliantUsername)
195+
require.NoError(t, err)
188196
}
189197

190198
func (r *SetupMigrationRunner) prepareAppStudioProvisionedUser(t *testing.T) {

0 commit comments

Comments
 (0)