-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add integration tests for automatic project deletion #4136
Conversation
@@ -82,36 +82,42 @@ class AdminDsl(cl: HttpClient, config: TestsConfig) extends TestHelpers with Cir | |||
id: String, | |||
description: String, | |||
authenticated: Authenticated, | |||
expectedResponse: Option[ExpectedResponse] = None | |||
expectedResponse: Option[ExpectedResponse] = None, | |||
ignoreConflict: Boolean = false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be able to run the test locally multiple times
"Setting up" should { | ||
"succeed in setting up org and project" in { | ||
for { | ||
_ <- aclDsl.addPermissions("/", Bojack, Set(Organizations.Create, Projects.Delete, Resources.Read, Events.Read)) | ||
// First org and projects | ||
_ <- adminDsl.createOrganization(org, org, Bojack, ignoreConflict = true) | ||
_ <- adminDsl.createProject(org, proj1, kgDsl.projectJson(name = proj1), Bojack) | ||
_ <- deltaClient.get[Json](s"/projects/$ref1", Bojack)(expect(StatusCodes.OK)) | ||
} yield succeed | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be beforeAll since it's setup
/** | ||
* Test related to automatic project deletion Only checks that the project deletion has been triggered and that the | ||
* project itself has been deleted. All the additional checks on the deletion of resources/views contained in this | ||
* project are done in [[ProjectsDeletionSpec]] | ||
* | ||
* @see | ||
* ProjectsDeletionSpec | ||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's probably worth mentioning the configuration that this test relies on ("autodeletion" is in the configuration as an organisation which will auto delete projects after 5 seconds)
Fixes #3866