mirror of
https://github.com/kevin-DL/revel-cmd.git
synced 2026-01-23 15:31:26 +00:00
Updated formating
Ran through testing individually for vendored Revel applications
This commit is contained in:
@@ -55,7 +55,7 @@ func init() {
|
||||
// Called to update the config command with from the older stype
|
||||
func updateTestConfig(c *model.CommandConfig, args []string) bool {
|
||||
c.Index = model.TEST
|
||||
if len(args)==0 && c.Test.ImportPath!="" {
|
||||
if len(args) == 0 && c.Test.ImportPath != "" {
|
||||
return true
|
||||
}
|
||||
|
||||
@@ -99,7 +99,7 @@ func testApp(c *model.CommandConfig) (err error) {
|
||||
}
|
||||
|
||||
// Direct all the output into a file in the test-results directory.
|
||||
file, err := os.OpenFile(filepath.Join(resultPath, "app.log"), os.O_CREATE|os.O_WRONLY|os.O_APPEND, 0666)
|
||||
file, err := os.OpenFile(filepath.Join(resultPath, "app.log"), os.O_CREATE | os.O_WRONLY | os.O_APPEND, 0666)
|
||||
if err != nil {
|
||||
return utils.NewBuildError("Failed to create test result log file: ", "error", err)
|
||||
}
|
||||
@@ -109,7 +109,7 @@ func testApp(c *model.CommandConfig) (err error) {
|
||||
return utils.NewBuildIfError(reverr, "Error building: ")
|
||||
}
|
||||
var paths []byte
|
||||
if len(app.PackagePathMap)>0 {
|
||||
if len(app.PackagePathMap) > 0 {
|
||||
paths, _ = json.Marshal(app.PackagePathMap)
|
||||
}
|
||||
runMode := fmt.Sprintf(`{"mode":"%s", "specialUseFlag":%v,"packagePathMap":%s}`, app.Paths.RunMode, c.Verbose, string(paths))
|
||||
@@ -117,7 +117,7 @@ func testApp(c *model.CommandConfig) (err error) {
|
||||
runMode = app.Paths.RunMode
|
||||
}
|
||||
cmd := app.Cmd(runMode)
|
||||
cmd.Dir=c.AppPath
|
||||
cmd.Dir = c.AppPath
|
||||
|
||||
cmd.Stderr = io.MultiWriter(cmd.Stderr, file)
|
||||
cmd.Stdout = io.MultiWriter(cmd.Stderr, file)
|
||||
@@ -234,7 +234,7 @@ func filterTestSuites(suites *[]tests.TestSuiteDesc, suiteArgument string) *[]te
|
||||
// in case it hasn't finished starting up yet.
|
||||
func getTestsList(baseURL string) (*[]tests.TestSuiteDesc, error) {
|
||||
var (
|
||||
err error
|
||||
err error
|
||||
resp *http.Response
|
||||
testSuites []tests.TestSuiteDesc
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user