> On Jan. 2, 2019, 9:19 p.m., Velmurugan Periasamy wrote:
> > Getting the below error. Any thoughts?
> > 
> > ```
> > [INFO]
> > [INFO] --- frontend-maven-plugin:1.6:karma (karma dev) @ security-admin-web 
> > ---
> > [INFO] Running 'karma start 
> > security-admin-web-2.0.0-SNAPSHOT/tests/karma-dev.conf.js' in 
> > /Users/vperiasamy/git/tlp-ranger/master/ranger/security-admin/target
> > [INFO] 02 01 2019 15:45:14.446:ERROR [config]: File 
> > /Users/vperiasamy/git/tlp-ranger/master/ranger/security-admin/target/security-admin-web-2.0.0-SNAPSHOT/tests/karma-dev.conf.js
> >  does not exist!
> > [INFO]
> > ```

Sorry, my fault. Since the node executable and node_modules are in the target 
folder, they are deleted by `mvn clean`, resulting in longer clean builds. 
So I started running builds without `clean` and did not notice the error.

In the latest patch the test code is no longer copied to the target folder, 
testing loads them from `src/main/javascript`.

`mvn clean verify -am -pl security-admin` now succeeds for me:

```
[INFO] --- frontend-maven-plugin:1.6:karma (karma prd) @ security-admin-web ---
[INFO] Running 'karma start ../src/test/javascript/karma-prd.conf.js' in 
/Users/ckoncz/work/git/hwx/ranger/security-admin/target
[INFO] 03 01 2019 14:32:16.990:INFO [karma]: Karma v3.0.0 server started at 
http://0.0.0.0:9876/
[INFO] 03 01 2019 14:32:16.992:INFO [launcher]: Launching browser PhantomJS 
with unlimited concurrency
[INFO] 03 01 2019 14:32:16.999:INFO [launcher]: Starting browser PhantomJS
[INFO] 03 01 2019 14:32:18.166:INFO [PhantomJS 2.1.1 (Mac OS X 0.0.0)]: 
Connected on socket qikxltc2xzvreqreAAAA with id 44874780
[core]
       LOG: 'just before loading Main'
[INFO] PhantomJS 2.1.1 (Mac OS X 0.0.0): Executed 0 of 1 SUCCESS (0 secs / 0 
secs)
[INFO] 03 01 2019 14:32:18.407:WARN [web-server]: 404: /service/plugins/csrfconf
[INFO] 03 01 2019 14:32:18.416:WARN [web-server]: 404: 
/service/users/profile?_=1546522338287
[INFO] 03 01 2019 14:32:18.442:WARN [web-server]: 404: /images/avatar.png
       LOG: 'initialize a Communicator'
[INFO] PhantomJS 2.1.1 (Mac OS X 0.0.0): Executed 0 of 1 SUCCESS (0 secs / 0 
secs)
       LOG: 'Initialize a Region Manager'
       LOG: 'initialize a Controller Controller'
       LOG: 'initialized a TopNav ItemView'
       LOG: 'initialized a ProfileBar ItemView'
       LOG: 'initialized a Footer ItemView'
       LOG: 'Error in service/plugins/checksso REST call404'
       LOG: 'initialized a ErrorView ItemView'
       LOG: 'mainModule.success=false'
       PhantomJS 2.1.1 (Mac OS X 0.0.0): Executed 1 of 1 SUCCESS (0.15 secs / 
0.139 secs)
[INFO] TOTAL: 1 SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] ranger 2.0.0-SNAPSHOT .............................. SUCCESS [  3.622 s]
[INFO] Credential Support ................................. SUCCESS [  4.463 s]
[INFO] Audit Component .................................... SUCCESS [  2.811 s]
[INFO] Common library for Plugins ......................... SUCCESS [  8.896 s]
[INFO] Ranger Util ........................................ SUCCESS [  1.922 s]
[INFO] Unix Authentication Client ......................... SUCCESS [  1.046 s]
[INFO] Security Admin Web Application 2.0.0-SNAPSHOT ...... SUCCESS [01:59 min]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 02:22 min
[INFO] Finished at: 2019-01-03T14:32:18+01:00
[INFO] ------------------------------------------------------------------------
```


- Csaba


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/69067/#review211616
-----------------------------------------------------------


On Jan. 3, 2019, 1:43 p.m., Csaba Koncz wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/69067/
> -----------------------------------------------------------
> 
> (Updated Jan. 3, 2019, 1:43 p.m.)
> 
> 
> Review request for ranger.
> 
> 
> Bugs: RANGER-2255
>     https://issues.apache.org/jira/browse/RANGER-2255
> 
> 
> Repository: ranger
> 
> 
> Description
> -------
> 
> Added JavaScript testing infrastructure (Karma, Mocha, PhantomJS) and a basic 
> test to verify that both the initial uncompressed JavaScript module tree and 
> the minified version can be loaded by a browser.
> 
> There are two test (Karma) configurations that correspond to the two module 
> loading methods.
> 
> Later on more sophisticated tests can be added that mock backend services and 
> do "real" business logic testing.
> 
> 
> Diffs
> -----
> 
>   security-admin/pom.xml c67860115 
>   security-admin/src/main/webapp/index.html 4eb97353b 
>   security-admin/src/main/webapp/minify.build.js 4b94bb159 
>   security-admin/src/main/webapp/package-lock.json f7a72833f 
>   security-admin/src/main/webapp/package.json 9f2274445 
>   security-admin/src/main/webapp/scripts/Init.js 52b49e5fb 
>   security-admin/src/main/webapp/scripts/Main.js 941414618 
>   security-admin/src/test/javascript/karma-common.conf.js PRE-CREATION 
>   security-admin/src/test/javascript/karma-dev.conf.js PRE-CREATION 
>   security-admin/src/test/javascript/karma-prd.conf.js PRE-CREATION 
>   security-admin/src/test/javascript/test-main.js PRE-CREATION 
>   security-admin/src/test/javascript/tests/main-test.js PRE-CREATION 
> 
> 
> Diff: https://reviews.apache.org/r/69067/diff/4/
> 
> 
> Testing
> -------
> 
> Executed mvn clean verify. The output contained the following:
> 
> [INFO] --- frontend-maven-plugin:1.6:npm (npm run karma dev) @ 
> security-admin-web ---
> [INFO] Running 'npm run karma -- start 
> security-admin-web-2.0.0-SNAPSHOT/tests/karma-dev.conf.js' in 
> /Users/ckoncz/work/git/hwx/ranger/security-admin/target
> [INFO]
> [INFO] > security-admin@2.0.0 karma 
> /Users/ckoncz/work/git/hwx/ranger/security-admin/target
> [INFO] > karma "start" 
> "security-admin-web-2.0.0-SNAPSHOT/tests/karma-dev.conf.js"
> [INFO]
> [INFO] 17 10 2018 21:32:26.799:WARN [watcher]: Pattern 
> "/Users/ckoncz/work/git/hwx/ranger/security-admin/target/security-admin-web-2.0.0-SNAPSHOT/node_modules/chai/chai.js"
>  does not match any file.
> [INFO] 17 10 2018 21:32:26.802:WARN [watcher]: Pattern 
> "/Users/ckoncz/work/git/hwx/ranger/security-admin/target/security-admin-web-2.0.0-SNAPSHOT/node_modules/karma-requirejs/lib/adapter.js"
>  does not match any file.
> [INFO] 17 10 2018 21:32:26.944:INFO [karma]: Karma v3.0.0 server started at 
> http://0.0.0.0:9876/
> [INFO] 17 10 2018 21:32:26.944:INFO [launcher]: Launching browser PhantomJS 
> with unlimited concurrency
> [INFO] 17 10 2018 21:32:26.949:INFO [launcher]: Starting browser PhantomJS
> [INFO] 17 10 2018 21:32:27.792:INFO [PhantomJS 2.1.1 (Mac OS X 0.0.0)]: 
> Connected on socket PKDEs28ja09HLFyLAAAA with id 27321101
>        LOG: 'just before loading Main'
> [INFO] PhantomJS 2.1.1 (Mac OS X 0.0.0): Executed 0 of 1 SUCCESS (0 secs / 0 
> secs)
>        LOG: 'initialize a Communicator'
>        LOG: 'Initialize a Region Manager'
> [INFO] PhantomJS 2.1.1 (Mac OS X 0.0.0): Executed 0 of 1 SUCCESS (0 secs / 0 
> secs)
> [INFO] 17 10 2018 21:32:28.788:WARN [web-server]: 404: 
> /service/users/profile?_=1539804747867
> [INFO] 17 10 2018 21:32:28.827:WARN [web-server]: 404: /images/avatar.png
>        LOG: 'initialize a Controller Controller'
> [INFO] PhantomJS 2.1.1 (Mac OS X 0.0.0): Executed 0 of 1 SUCCESS (0 secs / 0 
> secs)
>        LOG: 'initialized a TopNav ItemView'
>        LOG: 'initialized a ProfileBar ItemView'
>        LOG: 'initialized a Footer ItemView'
>        LOG: 'Error in service/plugins/checksso REST call404'
>        LOG: 'initialized a ErrorView ItemView'
>        LOG: 'mainModule.success=false'
>        PhantomJS 2.1.1 (Mac OS X 0.0.0): Executed 1 of 1 SUCCESS (0.966 secs 
> / 0.958 secs)
> [INFO] TOTAL: 1 SUCCESS
> [INFO]
> [INFO] --- frontend-maven-plugin:1.6:npm (npm run karma prd) @ 
> security-admin-web ---
> [INFO] Running 'npm run karma -- start 
> security-admin-web-2.0.0-SNAPSHOT/tests/karma-prd.conf.js' in 
> /Users/ckoncz/work/git/hwx/ranger/security-admin/target
> [INFO]
> [INFO] > security-admin@2.0.0 karma 
> /Users/ckoncz/work/git/hwx/ranger/security-admin/target
> [INFO] > karma "start" 
> "security-admin-web-2.0.0-SNAPSHOT/tests/karma-prd.conf.js"
> [INFO]
> [INFO] 17 10 2018 21:32:29.524:WARN [watcher]: Pattern 
> "/Users/ckoncz/work/git/hwx/ranger/security-admin/target/security-admin-web-2.0.0-SNAPSHOT/node_modules/chai/chai.js"
>  does not match any file.
> [INFO] 17 10 2018 21:32:29.527:WARN [watcher]: Pattern 
> "/Users/ckoncz/work/git/hwx/ranger/security-admin/target/security-admin-web-2.0.0-SNAPSHOT/node_modules/karma-requirejs/lib/adapter.js"
>  does not match any file.
> [INFO] 17 10 2018 21:32:29.671:INFO [karma]: Karma v3.0.0 server started at 
> http://0.0.0.0:9876/
> [INFO] 17 10 2018 21:32:29.671:INFO [launcher]: Launching browser PhantomJS 
> with unlimited concurrency
> [INFO] 17 10 2018 21:32:29.686:INFO [launcher]: Starting browser PhantomJS
> [INFO] 17 10 2018 21:32:30.560:INFO [PhantomJS 2.1.1 (Mac OS X 0.0.0)]: 
> Connected on socket yzaLy1GMCrq06Z5DAAAA with id 31360149
>        LOG: 'just before loading Main'
> [INFO] PhantomJS 2.1.1 (Mac OS X 0.0.0): Executed 0 of 1 SUCCESS (0 secs / 0 
> secs)
> [INFO] 17 10 2018 21:32:30.771:WARN [web-server]: 404: 
> /service/plugins/csrfconf
> [INFO] 17 10 2018 21:32:30.781:WARN [web-server]: 404: 
> /service/users/profile?_=1539804750660
> [INFO] 17 10 2018 21:32:30.805:WARN [web-server]: 404: /images/avatar.png
>        LOG: 'initialize a Communicator'
> [INFO] PhantomJS 2.1.1 (Mac OS X 0.0.0): Executed 0 of 1 SUCCESS (0 secs / 0 
> secs)
>        LOG: 'Initialize a Region Manager'
>        LOG: 'initialize a Controller Controller'
>        LOG: 'initialized a TopNav ItemView'
>        LOG: 'initialized a ProfileBar ItemView'
>        LOG: 'initialized a Footer ItemView'
>        LOG: 'Error in service/plugins/checksso REST call404'
>        LOG: 'initialized a ErrorView ItemView'
>        LOG: 'mainModule.success=false'
>        PhantomJS 2.1.1 (Mac OS X 0.0.0): Executed 1 of 1 SUCCESS (0.145 secs 
> / 0.132 secs)
> [INFO] TOTAL: 1 SUCCESS
> [INFO]
> [INFO] --- maven-war-plugin:2.6:war (default-war) @ security-admin-web ---
> [INFO] Packaging webapp
> [INFO] Assembling webapp [security-admin-web] in 
> [/Users/ckoncz/work/git/hwx/ranger/security-admin/target/security-admin-web-2.0.0-SNAPSHOT]
> [INFO] Processing war project
> [INFO] Webapp assembled in [356 msecs]
> [INFO] Building war: 
> /Users/ckoncz/work/git/hwx/ranger/security-admin/target/security-admin-web-2.0.0-SNAPSHOT.war
> [INFO]
> 
> 
> I.e. Karma was launched two times and and each time a single test was 
> successfully executed.
> There are also logs that indicate that JavaScript application startup was 
> triggered. However, this could not succeed because of missing backend 
> services.
> 
> 
> Thanks,
> 
> Csaba Koncz
> 
>

Reply via email to