mirror of
https://github.com/kevin-DL/revel-cmd.git
synced 2026-01-11 18:54:31 +00:00
Merge pull request #61 from krhubert/develop
Use config.http.addr and config.http.ssl for create baseURL local server
This commit is contained in:
@@ -97,8 +97,18 @@ func testApp(args []string) {
|
||||
defer cmd.Kill()
|
||||
revel.INFO.Printf("Testing %s (%s) in %s mode\n", revel.AppName, revel.ImportPath, mode)
|
||||
|
||||
var httpAddr = revel.HttpAddr
|
||||
if httpAddr == "" {
|
||||
httpAddr = "127.0.0.1"
|
||||
}
|
||||
|
||||
var httpProto = "http"
|
||||
if revel.HttpSsl {
|
||||
httpProto = "https"
|
||||
}
|
||||
|
||||
// Get a list of tests
|
||||
var baseURL = fmt.Sprintf("http://127.0.0.1:%d", revel.HTTPPort)
|
||||
var baseURL = fmt.Sprintf("%s://%s:%d", httpProto, httpAddr, revel.HTTPPort)
|
||||
testSuites, _ := getTestsList(baseURL)
|
||||
|
||||
// If a specific TestSuite[.Method] is specified, only run that suite/test
|
||||
|
||||
Reference in New Issue
Block a user