Skip to content
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

Merged
merged 3 commits into from
Aug 7, 2023

Conversation

imsdu
Copy link
Contributor

@imsdu imsdu commented Aug 4, 2023

Fixes #3866

@@ -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
Copy link
Contributor Author

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

Comment on lines 28 to 38
"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
}
}
Copy link
Contributor

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

Comment on lines 11 to 18
/**
* 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
*/
Copy link
Contributor

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)

@imsdu imsdu merged commit a31dc9f into BlueBrain:master Aug 7, 2023
1 check passed
@imsdu imsdu deleted the 3866-it-project-deletion branch August 7, 2023 12:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add integration tests for automatic project deletion
3 participants