test: appease the tester

This commit is contained in:
2025-08-18 20:45:47 +02:00
parent 34d2e3b092
commit 81c28e3006
2 changed files with 4 additions and 4 deletions

View File

@ -146,7 +146,7 @@ func getDeployType(currentVersion, newVersion string) string {
func PostCmds(cl *dockerClient.Client, app appPkg.App, commands string) error {
if _, err := os.Stat(app.Recipe.AbraShPath); err != nil {
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
}
@ -154,7 +154,7 @@ func PostCmds(cl *dockerClient.Client, app appPkg.App, commands string) error {
for _, command := range strings.Split(commands, "|") {
commandParts := strings.Split(command, " ")
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]
cmdName := commandParts[1]
@ -181,7 +181,7 @@ func PostCmds(cl *dockerClient.Client, app appPkg.App, commands string) error {
}
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)

View File

@ -88,7 +88,7 @@ func RunRemove(ctx context.Context, client *apiclient.Client, opts Remove) error
}
if len(errs) > 0 {
errCh <- errors.Errorf(strings.Join(errs, "\n"))
errCh <- errors.New(strings.Join(errs, "\n"))
return
}