mirror of
https://github.com/kevin-DL/revel-cmd.git
synced 2026-01-21 14:45:02 +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()
|
defer cmd.Kill()
|
||||||
revel.INFO.Printf("Testing %s (%s) in %s mode\n", revel.AppName, revel.ImportPath, mode)
|
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
|
// 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)
|
testSuites, _ := getTestsList(baseURL)
|
||||||
|
|
||||||
// If a specific TestSuite[.Method] is specified, only run that suite/test
|
// If a specific TestSuite[.Method] is specified, only run that suite/test
|
||||||
|
|||||||
Reference in New Issue
Block a user