forked from toolshed/abra
test: appease the tester
This commit is contained in:
@ -146,7 +146,7 @@ func getDeployType(currentVersion, newVersion string) string {
|
|||||||
func PostCmds(cl *dockerClient.Client, app appPkg.App, commands string) error {
|
func PostCmds(cl *dockerClient.Client, app appPkg.App, commands string) error {
|
||||||
if _, err := os.Stat(app.Recipe.AbraShPath); err != nil {
|
if _, err := os.Stat(app.Recipe.AbraShPath); err != nil {
|
||||||
if os.IsNotExist(err) {
|
if os.IsNotExist(err) {
|
||||||
return fmt.Errorf(fmt.Sprintf("%s does not exist for %s?", app.Recipe.AbraShPath, app.Name))
|
return fmt.Errorf("%s does not exist for %s?", app.Recipe.AbraShPath, app.Name)
|
||||||
}
|
}
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
@ -154,7 +154,7 @@ func PostCmds(cl *dockerClient.Client, app appPkg.App, commands string) error {
|
|||||||
for _, command := range strings.Split(commands, "|") {
|
for _, command := range strings.Split(commands, "|") {
|
||||||
commandParts := strings.Split(command, " ")
|
commandParts := strings.Split(command, " ")
|
||||||
if len(commandParts) < 2 {
|
if len(commandParts) < 2 {
|
||||||
return fmt.Errorf(fmt.Sprintf("not enough arguments: %s", command))
|
return fmt.Errorf("not enough arguments: %s", command)
|
||||||
}
|
}
|
||||||
targetServiceName := commandParts[0]
|
targetServiceName := commandParts[0]
|
||||||
cmdName := commandParts[1]
|
cmdName := commandParts[1]
|
||||||
@ -181,7 +181,7 @@ func PostCmds(cl *dockerClient.Client, app appPkg.App, commands string) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if !matchingServiceName {
|
if !matchingServiceName {
|
||||||
return fmt.Errorf(fmt.Sprintf("no service %s for %s?", targetServiceName, app.Name))
|
return fmt.Errorf("no service %s for %s?", targetServiceName, app.Name)
|
||||||
}
|
}
|
||||||
|
|
||||||
log.Debugf("running command %s %s within the context of %s_%s", cmdName, parsedCmdArgs, app.StackName(), targetServiceName)
|
log.Debugf("running command %s %s within the context of %s_%s", cmdName, parsedCmdArgs, app.StackName(), targetServiceName)
|
||||||
|
@ -88,7 +88,7 @@ func RunRemove(ctx context.Context, client *apiclient.Client, opts Remove) error
|
|||||||
}
|
}
|
||||||
|
|
||||||
if len(errs) > 0 {
|
if len(errs) > 0 {
|
||||||
errCh <- errors.Errorf(strings.Join(errs, "\n"))
|
errCh <- errors.New(strings.Join(errs, "\n"))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user