Repository: hygieia/hygieia

Issue #1471: API compile fails a certain commit
Created: 2017-06-12T21:10:50Z
After this commit, a mvn install for the api fails for me.  I've included the pertinent portion of the log, but let me know if I need to include more.
As a further confusion, it fails on several Ubuntu servers I tested but it it compiles fine on my macbook (Sierra 10.12.5).
registerUser(com.capitalone.dashboard.auth.DefaultSecurityTest)  Time elapsed: 0.052 sec  <<< FAILURE!
java.lang.AssertionError: Status expected:<200> but was:<401>
        at org.springframework.test.util.AssertionErrors.fail(AssertionErrors.java:60)
        at org.springframework.test.util.AssertionErrors.assertEquals(AssertionErrors.java:89)
        at org.springframework.test.web.servlet.result.StatusResultMatchers$10.match(StatusResultMatchers.java:655)
        at org.springframework.test.web.servlet.MockMvc$1.andExpect(MockMvc.java:171)
        at com.capitalone.dashboard.auth.DefaultSecurityTest.registerUser(DefaultSecurityTest.java:87)

Running com.capitalone.dashboard.auth.ldap.LdapAuthenticationDetailsSourceTest```

Duplicate issue #1529: API failing to build because of maven-surefire-plugin test
Created: 2017-07-12T18:07:29Z
I've been working on getting this to build on a CentOS Box, but have been running into this error when trying to build the API. Docker builds fail because of this as well, but it does succeed with the -DskipTests flag. The error, with tests follows:
Failed tests:
  DefaultSecurityTest.registerUser:87 Status expected:<200> but was:<401>

Tests run: 268, Failures: 1, Errors: 0, Skipped: 3

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 12.631 s
[INFO] Finished at: 2017-07-12T14:03:48-05:00
[INFO] Final Memory: 26M/322M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.18.1:test (default-test) on project api: There are test failures.
[ERROR]
[ERROR] Please refer to /opt/hygieia/api/target/surefire-reports for the individual test results.
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

Then when running mvn docker:build I get the following error, assuming because the API fails to build:
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] com.capitalone.dashboard:Hygieia .................. SUCCESS [  0.811 s]
[INFO] com.capitalone.dashboard:core ..................... SUCCESS [  0.012 s]
[INFO] com.capitalone.dashboard:api ...................... FAILURE [  4.492 s]
[INFO] com.capitalone.dashboard:artifactory-artifact-collector  SKIPPED
[INFO] com.capitalone.dashboard:bamboo-build-collector ... SKIPPED
[INFO] com.capitalone.dashboard:jenkins-build-collector .. SKIPPED
[INFO] com.capitalone.dashboard:jenkins-cucumber-test-collector  SKIPPED
[INFO] com.capitalone.dashboard:sonar-codequality-collector  SKIPPED
[INFO] com.capitalone.dashboard:aws-cloud-collector ...... SKIPPED
[INFO] com.capitalone.dashboard:udeploy-deployment-collector  SKIPPED
[INFO] com.capitalone.dashboard:xldeploy-deployment-collector  SKIPPED
[INFO] com.capitalone.dashboard:jira-feature-collector ... SKIPPED
[INFO] com.capitalone.dashboard:versionone-feature-collector  SKIPPED
[INFO] com.capitalone.dashboard:gitlab-feature-collector . SKIPPED
[INFO] com.capitalone.dashboard:chat-ops-collector ....... SKIPPED
[INFO] com.capitalone.dashboard:appdynamics-performance-collector  SKIPPED
[INFO] com.capitalone.dashboard:bitbucket-scm-collector .. SKIPPED
[INFO] com.capitalone.dashboard:github-scm-collector ..... SKIPPED
[INFO] com.capitalone.dashboard:subversion-collector ..... SKIPPED
[INFO] com.capitalone.dashboard:gitlab-scm-collector ..... SKIPPED
[INFO] com.capitalone.dashboard:hpsm-cmdb-collector ...... SKIPPED
[INFO] com.capitalone.dashboard:nexus-iq-collector ....... SKIPPED
[INFO] Hygieia Publisher Plugin .......................... SKIPPED
[INFO] com.capitalone.dashboard:UI ....................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 7.086 s
[INFO] Finished at: 2017-07-12T14:15:28-05:00
[INFO] Final Memory: 35M/510M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.spotify:docker-maven-plugin:0.4.10:build (default-cli) on project api: Exception caught: COPY failed: stat /var/lib/docker/tmp/docker-builder321982166/target: no such file or directory -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <goals> -rf :api

If I do skip the tests, I can run the java -jar for the API and it connects and works fine with the Gulp command. Additionally, I can run Gulp and it loads the login screen, but I can't create a user, I get a "User Exists" message regardless of what I type.
Thanks!

Closing comment (2017-07-13T16:45:32Z): I think this is related to or a duplicate of #1471. It's the same error when looking at the log.