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

Falha ao carregar o HikariDataSouce nas classes de testes de controladores #58

Open
tacianosilva opened this issue Nov 20, 2020 · 0 comments
Assignees
Labels
Milestone

Comments

@tacianosilva
Copy link
Member

Ao executar mvn test seguinte erro estava ocorrendo:

Failed to bind properties under '' to com.zaxxer.hikari.HikariDataSource.

Isso ocorria ao executar as classes de testes de controladores LoginControllerTest e UserStoryControllerTest.

Para resolvermos acrescentamos o atributo DataSouce com a anotação @MockBean nas classes de testes de controladores:

    @MockBean
    private DataSource dataSource;

Com esta modificação os testes executaram perfeitamente.

@tacianosilva tacianosilva added this to the Release 01 milestone Nov 20, 2020
@tacianosilva tacianosilva self-assigned this Nov 20, 2020
tacianosilva added a commit that referenced this issue Nov 20, 2020
Esse erro ocorria nas classes de testes de controladores.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant