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 ability to run tests with no OIDC Provider running #9484

Merged
merged 8 commits into from Mar 28, 2019

Conversation

Projects
None yet
4 participants
@mraible
Copy link
Contributor

commented Mar 27, 2019

  • Please make sure the below checklist is followed for Pull Requests.

  • Travis tests are green

  • Tests are added where necessary

  • Documentation is added/updated where necessary

  • Coding Rules & Commit Guidelines as per our CONTRIBUTING.md document are followed

Fixes integration issues discussed in #9416 (comment)

@mraible mraible referenced this pull request Mar 27, 2019

Merged

Upgrade to Spring Security 5.1's OIDC Support #9416

4 of 4 tasks complete

@mraible mraible closed this Mar 27, 2019

@mraible mraible reopened this Mar 27, 2019

@@ -23,6 +23,7 @@ package <%=packageName%>.web.rest;
import <%=packageName%>.AbstractCassandraTest;
<%_ } _%>
import <%=packageName%>.<%= mainClass %>;
import <%=packageName%>.config.TestSecurityConfiguration;

This comment has been minimized.

Copy link
@DanielFran

DanielFran Mar 27, 2019

Member

Did you missed the condition if (authenticationType === 'oauth2')....?

This comment has been minimized.

Copy link
@mraible

mraible Mar 27, 2019

Author Contributor

This isn't needed in this case because there's an <%_ if (authenticationType === 'oauth2') { _%> on line 20.

This comment has been minimized.

Copy link
@DanielFran

DanielFran Mar 27, 2019

Member

But this condition ended in line 24, no?

This comment has been minimized.

Copy link
@DanielFran

DanielFran Mar 27, 2019

Member

Forget, I read it bad :(

@mraible

This comment has been minimized.

Copy link
Contributor Author

commented Mar 27, 2019

I'm seeing the following error fairly consistenly in the JHI_APP=ngx-mariadb-oauth2-sass-infinispan JHI_PROTRACTOR=1 JHI_ENTITY=sql test:

The job exceeded the maximum time limit for jobs, and has been terminated.

Any idea how to fix?

Related: Azure pipelines is failing with a similar error in https://jhipster.visualstudio.com/generator-jhipster/_build/results?buildId=2721

The job running on agent Hosted Ubuntu 1604 3 has exceeded the maximum execution time of 60.
@mraible

This comment has been minimized.

Copy link
Contributor Author

commented Mar 27, 2019

This may be caused by Travis having issues: https://www.traviscistatus.com/

Screen Shot 2019-03-27 at 1 12 19 PM

@mraible

This comment has been minimized.

Copy link
Contributor Author

commented Mar 27, 2019

C'mon Travis, you can do it!

@mraible mraible closed this Mar 27, 2019

@mraible mraible reopened this Mar 27, 2019

@pascalgrimaud pascalgrimaud merged commit 584e2f0 into jhipster:master Mar 28, 2019

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
jhipster.generator-jhipster Build #20190328.3 succeeded
Details

@mraible mraible deleted the mraible:oidc-integration-tests branch Mar 28, 2019

@DanielFran

This comment has been minimized.

Copy link
Member

commented Mar 28, 2019

@mraible

This comment has been minimized.

Copy link
Contributor Author

commented Mar 28, 2019

@DanielFran Thanks for the heads up. Looking now.

@mraible

This comment has been minimized.

Copy link
Contributor Author

commented Mar 28, 2019

These all seem to be failing because Keycloak is not running for the e2e tests.

@pascalgrimaud Do you know where are Docker containers started in this jhipster-daily-build project's scripts?

@pascalgrimaud

This comment has been minimized.

Copy link
Member

commented Mar 28, 2019

@mraible : in jhipster-daily-builds, it uses the same script in the main generator-jhipster, so it is in this folder:

@mraible

This comment has been minimized.

Copy link
Contributor Author

commented Mar 28, 2019

Thanks for the fast response @pascalgrimaud. Keycloak is not started for these instances because no keycloak.yml is installed. This is because they're microservices and require a gateway for e2e tests. Why are we running e2e tests on microservices?

@pascalgrimaud

This comment has been minimized.

Copy link
Member

commented Mar 28, 2019

Oh I think I understand. I didn't notice we remove keycloak.yml for microservice.
For microservices, there is no e2e, just a check in management/health :

https://github.com/jhipster/generator-jhipster/blob/master/test-integration/scripts/24-tests-e2e.sh#L22-L24

@mraible

This comment has been minimized.

Copy link
Contributor Author

commented Mar 28, 2019

Hmmm, what's the best way to solve this then?

  1. Remove e2e tests for microservices
  2. Figure out a way to add Keycloak and related files just for tests

We don't want to include Keycloak files for microservices because it just confuses the end user.

@pascalgrimaud

This comment has been minimized.

Copy link
Member

commented Mar 28, 2019

Thanks for pointing the problem, I'll take care of this.
I will add a specific Keycloak only for our CI: it is important to test if the microservice is launched correctly

@jdubois jdubois added this to the 6.0.0-beta.0 milestone Apr 4, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.