java - Play 2.5: I can run test by Intelij IDEA but not with ./activator -


i run fake server batch of functional tests, fill database evolutions. idea works test in intelijidea, cannot configure ci because activator test fails...

./activator -dconfig.resource=env_test.conf testonly com.api.test.functionaltestssuite  [info] loading project definition /users/aieremenko/pr/api/project [info] set current project api (in build file:/users/aieremenko/pr/api/) [info] test run started first [warn] application - hardcoded value: user deprecated, use username instead [info] application - creating pool datasource 'default' starting server before provideapplication [error] test com.api.test.functionaltestssuite failed: play.api.configuration$$anon$1: configuration error[null], took 0.0 sec [error]     @ play.api.configuration$.configerror(configuration.scala:154) [error]     @ play.api.configuration.reporterror(configuration.scala:806) [error]     @ play.configuration.reporterror(configuration.java:366) [error]     @ play.db.ebean.defaultebeanconfig$ebeanconfigparser.setserverconfigdatasource(defaultebeanconfig.java:94) [error]     @ play.db.ebean.defaultebeanconfig$ebeanconfigparser.parse(defaultebeanconfig.java:75) [error]     @ play.db.ebean.defaultebeanconfig$ebeanconfigparser.get(defaultebeanconfig.java:56) [error]     @ play.db.ebean.defaultebeanconfig$ebeanconfigparser.get(defaultebeanconfig.java:40) [error]     @ com.google.inject.internal.providerinternalfactory.provision(providerinternalfactory.java:81) [error]     @ com.google.inject.internal.boundproviderfactory.provision(boundproviderfactory.java:72) [error]     @ com.google.inject.internal.providerinternalfactory.circularget(providerinternalfactory.java:61) [error]     @ com.google.inject.internal.boundproviderfactory.get(boundproviderfactory.java:62) [error]     @ com.google.inject.internal.providertointernalfactoryadapter$1.call(providertointernalfactoryadapter.java:46) [error]     @ com.google.inject.internal.injectorimpl.callincontext(injectorimpl.java:1103) [error]     @ com.google.inject.internal.providertointernalfactoryadapter.get(providertointernalfactoryadapter.java:40) [error]     @ com.google.inject.internal.singletonscope$1.get(singletonscope.java:145) [error]     @ com.google.inject.internal.internalfactorytoprovideradapter.get(internalfactorytoprovideradapter.java:41) [error]     @ com.google.inject.internal.singleparameterinjector.inject(singleparameterinjector.java:38) [error]     @ com.google.inject.internal.singleparameterinjector.getall(singleparameterinjector.java:62) [error]     @ com.google.inject.internal.constructorinjector.provision(constructorinjector.java:104) [error]     @ com.google.inject.internal.constructorinjector.construct(constructorinjector.java:85) [error]     @ com.google.inject.internal.constructorbindingimpl$factory.get(constructorbindingimpl.java:267) [error]     @ com.google.inject.internal.providertointernalfactoryadapter$1.call(providertointernalfactoryadapter.java:46) [error]     @ com.google.inject.internal.injectorimpl.callincontext(injectorimpl.java:1103) [error]     @ com.google.inject.internal.providertointernalfactoryadapter.get(providertointernalfactoryadapter.java:40) [error]     @ com.google.inject.internal.singletonscope$1.get(singletonscope.java:145) [error]     @ com.google.inject.internal.internalfactorytoprovideradapter.get(internalfactorytoprovideradapter.java:41) [error]     @ com.google.inject.internal.factoryproxy.get(factoryproxy.java:56) [error]     @ com.google.inject.internal.providertointernalfactoryadapter$1.call(providertointernalfactoryadapter.java:46) [error]     @ com.google.inject.internal.injectorimpl.callincontext(injectorimpl.java:1103) [error]     @ com.google.inject.internal.providertointernalfactoryadapter.get(providertointernalfactoryadapter.java:40) [error]     @ com.google.inject.internal.singletonscope$1.get(singletonscope.java:145) [error]     @ com.google.inject.internal.internalfactorytoprovideradapter.get(internalfactorytoprovideradapter.java:41) [error]     @ com.google.inject.internal.internalinjectorcreator$1.call(internalinjectorcreator.java:205) [error]     @ com.google.inject.internal.internalinjectorcreator$1.call(internalinjectorcreator.java:199) [error]     @ com.google.inject.internal.injectorimpl.callincontext(injectorimpl.java:1092) [error]     @ com.google.inject.internal.internalinjectorcreator.loadeagersingletons(internalinjectorcreator.java:199) [error]     @ com.google.inject.internal.internalinjectorcreator.injectdynamically(internalinjectorcreator.java:180) [error]     @ com.google.inject.internal.internalinjectorcreator.build(internalinjectorcreator.java:110) [error]     @ com.google.inject.guice.createinjector(guice.java:96) [error]     @ com.google.inject.guice.createinjector(guice.java:84) [error]     @ play.api.inject.guice.guicebuilder.injector(guiceinjectorbuilder.scala:181) [error]     @ play.api.inject.guice.guiceapplicationbuilder.build(guiceapplicationbuilder.scala:123) [error]     @ play.api.test.fakeapplication.<init>(fakes.scala:209) [error]     @ play.test.fakeapplication.<init>(fakeapplication.java:51) [error]     @ play.test.helpers.fakeapplication(helpers.java:124) [error]     @ com.dimanex.api.test.functionaltestssuite$1.provideapplication(functionaltestssuite.java:105) [error]     @ com.dimanex.api.test.functionaltestssuite$1.startserver(functionaltestssuite.java:54) [error]     @ com.dimanex.api.test.functionaltestssuite$1.before(functionaltestssuite.java:38) [error]     ... [error] caused by: java.lang.nullpointerexception [error]     @ play.db.ebean.defaultebeanconfig$ebeanconfigparser.setserverconfigdatasource(defaultebeanconfig.java:92) [error]     ... 64 more [info] test run finished: 1 failed, 0 ignored, 0 total, 41.043s 

i have separated files configs dev, prod , test mode. tests use own database miss possibility hurt production server(i don't use inmemory database)....

okay. activator ignores -dconfig.resource=env_test.conf test plugin. when use application.conf test purposes (which default config file) works. application running works:

./activator -dconfig.resource=env_dev.conf run 

but it's intelijidea runs test defiled -dconfig.resource=env_test.conf. it's funny:)


Comments

Popular posts from this blog

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -