Skip to content

Commit

Permalink
replay-tests: add failing test for using "conf/" directory
Browse files Browse the repository at this point in the history
Modify "multi-module-app" test to use the "conf/" directory:
- conf/application.conf
- conf/routes

To achieve this let move the "conf/" directory (which location is
defined in replay-tests.gradle) to the default resources location:
"src/main/resources/".

With this change these files would be at classpath
"conf/application.conf" and "conf/routes", NullPointerException:

HelloWorldSpec > openHelloWorldPage() FAILED
    java.lang.NullPointerException: File not found in classpath: application.conf
        at java.base/java.util.Objects.requireNonNull(Objects.java:336)
        at play.ClasspathResource.<init>(ClasspathResource.java:42)
        at play.ClasspathResource.file(ClasspathResource.java:26)
        at play.PropertiesConfLoader.readOneConfigurationFile(PropertiesConfLoader.java:34)
        at play.PropertiesConfLoader.readOneConfigurationFile(PropertiesConfLoader.java:30)
        at play.PropertiesConfLoader.readConfiguration(PropertiesConfLoader.java:26)
        at play.Play.readConfiguration(Play.java:230)
        at play.Play.init(Play.java:138)
        at play.server.Starter.start(Starter.java:19)
        at hello.HelloWorldApp.start(HelloWorldApp.java:7)
        at ui.hello.BaseSpec.startApp(BaseSpec.java:23)
        at ui.hello.BaseSpec.setUp(BaseSpec.java:17)

Ref: replay-framework#198
  • Loading branch information
xabolcs committed Apr 24, 2024
1 parent 0975f9a commit eb3b7d3
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 0 deletions.

0 comments on commit eb3b7d3

Please sign in to comment.