Skip to content

Commit

Permalink
Fix for no bean named entityManagerFactory by using @SpringBootTest t…
Browse files Browse the repository at this point in the history
…o load the full application context
  • Loading branch information
shubham1g5 committed Nov 2, 2024
1 parent 053d83e commit 4671ece
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,21 @@
import org.commcare.formplayer.web.client.WebClient;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.autoconfigure.web.client.AutoConfigureMockRestServiceServer;
import org.springframework.boot.test.autoconfigure.web.client.AutoConfigureWebClient;
import org.springframework.boot.test.autoconfigure.web.client.RestClientTest;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.boot.test.mock.mockito.MockBean;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.test.context.TestPropertySource;
import org.springframework.test.context.junit.jupiter.SpringExtension;
import org.springframework.test.web.client.MockRestServiceServer;

@RestClientTest(components = {HqUserDetailsService.class, WebClient.class})
@AutoConfigureWebClient(registerRestTemplate = true)
@SpringBootTest
@AutoConfigureMockRestServiceServer
@TestPropertySource(properties = {
"commcarehq.host=",
"commcarehq.formplayerAuthKey=secretkey"
Expand Down

0 comments on commit 4671ece

Please sign in to comment.