Skip to content

Commit

Permalink
feat: change fmt.Printf to fmt.Errors
Browse files Browse the repository at this point in the history
  • Loading branch information
JGiola committed Oct 19, 2022
1 parent 40d4a5a commit 3f68b99
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions deploy/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,22 +158,19 @@ func execDeploy(clients *K8sClients, namespace string, inputPaths []string, depl

crds, resources, err := MakeResources(filePaths, namespace, RealSupportedResourcesGetter{}, clients)
if err != nil {
fmt.Printf("fails to make resources: %s\n", err)
return err
return fmt.Errorf("fails to make resources: %w", err)
}

// deploy CRDs first (simplified example of 2-step deployment w/o checks on CRDs' status)...
err = Deploy(clients, namespace, crds, deployConfig, defaultApplyResource)
if err != nil {
fmt.Printf("fails to deploy crds: %s", err)
return err
return fmt.Errorf("fails to deploy crds: %w", err)
}

// ...and then all the remaining resources
err = Deploy(clients, namespace, resources, deployConfig, defaultApplyResource)
if err != nil {
fmt.Printf("fails to deploy resources: %s", err)
return err
return fmt.Errorf("fails to deploy resources: %w", err)
}

return Cleanup(clients, namespace, resources)
Expand Down

0 comments on commit 3f68b99

Please sign in to comment.