mirror of
https://github.com/kevin-DL/revel-cmd.git
synced 2026-01-19 21:55:27 +00:00
updated msg and condition check
This commit is contained in:
@@ -3,9 +3,6 @@ package main
|
|||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/revel/cmd/harness"
|
|
||||||
"github.com/revel/modules/testrunner/app/controllers"
|
|
||||||
"github.com/revel/revel"
|
|
||||||
"io"
|
"io"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"net/http"
|
"net/http"
|
||||||
@@ -13,6 +10,10 @@ import (
|
|||||||
"path"
|
"path"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/revel/cmd/harness"
|
||||||
|
"github.com/revel/modules/testrunner/app/controllers"
|
||||||
|
"github.com/revel/revel"
|
||||||
)
|
)
|
||||||
|
|
||||||
var cmdTest = &Command{
|
var cmdTest = &Command{
|
||||||
@@ -117,7 +118,7 @@ You can add it to a run mode configuration with the following line:
|
|||||||
)
|
)
|
||||||
for i := 0; ; i++ {
|
for i := 0; ; i++ {
|
||||||
if resp, err = http.Get(baseUrl + "/@tests.list"); err == nil {
|
if resp, err = http.Get(baseUrl + "/@tests.list"); err == nil {
|
||||||
if resp.StatusCode == 200 {
|
if resp.StatusCode == http.StatusOK {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -128,7 +129,7 @@ You can add it to a run mode configuration with the following line:
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
errorf("Failed to request test list: %s", err)
|
errorf("Failed to request test list: %s", err)
|
||||||
} else {
|
} else {
|
||||||
errorf("Failed to request test list: Not status code 200")
|
errorf("Failed to request test list: non-200 response")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
defer resp.Body.Close()
|
defer resp.Body.Close()
|
||||||
|
|||||||
Reference in New Issue
Block a user