Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions testsupport/space/spacerequest.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,7 @@ func CreateSpaceRequest(t *testing.T, awaitilities wait.Awaitilities, memberName
EnsureMUR().
Execute(t)

// wait for the namespace to be provisioned since we will be creating the spacerequest into it.
parentSpace, err := awaitilities.Host().WaitForSpace(t, user.Space.Name, wait.UntilSpaceHasAnyProvisionedNamespaces())
require.NoError(t, err)
parentSpace := user.Space

// create the space request in the "default" namespace provisioned by the parentSpace
spaceRequest := NewSpaceRequest(t, append(opts, WithNamespace(GetDefaultNamespace(parentSpace.Status.ProvisionedNamespaces)))...)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm afraid that now parentSpace.Status.ProvisionedNamespaces might be empty, when this line is executed, thus the spacerequest will not be created. But maybe I'm wrong.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it should not - look at the updated code in the other file/function - it has condition wait.UntilSpaceHasAnyProvisionedNamespaces() which ensures that there is gonna be some provisioned namespace set

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok I see now, I've missed that this VerifySpaceRelatedResources was called indirectly by the test.

It looks like we were already waiting for the space https://github.com/mfrancisc/toolchain-e2e/blob/8f4432ee3e06e75b90989469cee0aea29c28ab34/testsupport/user_assertions.go#L243-L249, we were probably only missing that wait.UntilSpaceHasAnyProvisionedNamespaces() in there.

Expand Down
7 changes: 7 additions & 0 deletions testsupport/user_assertions.go
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,13 @@ func VerifySpaceRelatedResources(t *testing.T, awaitilities wait.Awaitilities, u
tiers.VerifyNSTemplateSet(t, hostAwait, memberAwait, nsTemplateSet, space, tierChecks)

require.Equal(t, space.Name, userSignup.Status.HomeSpace)

space, err = awaitilities.Host().WaitForSpace(t, space.Name,
wait.UntilSpaceHasTier(spaceTierName),
wait.UntilSpaceHasConditions(wait.Provisioned()),
wait.UntilSpaceHasAnyProvisionedNamespaces())
require.NoError(t, err)

return space
}

Expand Down
Loading