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

Pivotal ID # 181937926: Avoid restarting ITests containers #560

Merged

Conversation

Juan-EBI
Copy link
Contributor

Copy link
Contributor

@jhoanmanuelms jhoanmanuelms left a comment

Choose a reason for hiding this comment

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

These changes look great and something our itests were needing for a long time. If I understood them correctly, what we're doing now is starting the containers once and running all the tests there. We're now also sharing a single instance of the temporary folder through the tests.

I only have one suggestion, should we have a dictionary with the accessions used for each test? Maybe putting them all in constants somewhere so we avoid collisions in the future.

Other than that, I only left some minor comments but everything looks great.

@@ -26,6 +26,10 @@ class SecurityTestService(
return user
}

fun ensureRegisterUser(testUser: TestUser) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd suggest ensureUserRegistration

import ac.uk.ebi.biostd.client.integration.web.SecurityWebClient
import ac.uk.ebi.biostd.itest.entities.TestUser

fun getWebClient(serverPort: Int, user: TestUser): BioWebClient {
Copy link
Contributor

Choose a reason for hiding this comment

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

one-liner

fun getWebClient(serverPort: Int, user: TestUser): BioWebClient =
    SecurityWebClient
        .create("http://localhost:$serverPort")
        .getAuthenticatedClient(user.email, user.password)

@@ -0,0 +1 @@
ac.uk.ebi.biostd.itest.itest.ITestListener
Copy link
Contributor

Choose a reason for hiding this comment

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

EOF

@Juan-EBI
Copy link
Contributor Author

These changes look great and something our itests were needing for a long time. If I understood them correctly, what we're doing now is starting the containers once and running all the tests there. We're now also sharing a single instance of the temporary folder through the tests.

I only have one suggestion, should we have a dictionary with the accessions used for each test? Maybe putting them all in constants somewhere so we avoid collisions in the future.

Other than that, I only left some minor comments but everything looks great.

Make sense yes, I will create several tickets to enhace itest which need a lot of re organizations.

@Juan-EBI Juan-EBI merged commit a381021 into master May 16, 2022
@jhoanmanuelms jhoanmanuelms deleted the chore/pivotal-181937926-avoid-restarting-itests-containers branch May 19, 2022 09:32
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.

2 participants