Top-Q / difido-reports

This project aims to provide a generic implementation for HTML test reports.
http://top-q.github.io/difido-reports
Apache License 2.0
47 stars 31 forks source link

server.address define at start file to 0.0.0.0 --> Elastic show URL 0.0.0.0 ..... #191

Closed igivon closed 6 years ago

igivon commented 6 years ago

spring server.address is define at start file to default of 0.0.0.0 this configuration cause elastic Url to show 0.0.0.0 and not the correct ip.

image

**configuration taken from Start.sh:

#=====================**==================
#      SPRING BOOT CONFIGURATION
#=======================================

# The port to use
readonly PORT=8080

readonly HOST=0.0.0.0

# Log levels: TRACE, DEBUG, INFO, WARN, ERROR
readonly LOGGING_LEVEL=ERROR

ESController.java findTestURL method:

 private String findTestUrl(ExecutionMetadata executionMetadata, String uid) {
        if (executionMetadata == null) {
            return "";
        }
        // @formatter:off
        // http://localhost:8080/reports/execution_2015_04_15__21_14_29_767/tests/test_8691429121669-2/test.html
        return "http://" + System.getProperty("server.address") + ":" + System.getProperty("server.port") + "/"
                + Common.REPORTS_FOLDER_NAME + "/" + executionMetadata.getFolderName() + "/" + "tests" + "/" + "test_"
                + uid + "/" + "test.html";
        // @formatter:on
    }
itaiag commented 6 years ago

The idea is that you could edit the start.sh or start.bat with the correct IP of the server. This can not done automatically (or, I didn't figured out a good way to do it).