From b824ee54471d583c66dce7225ebd4c935ef3f9fb Mon Sep 17 00:00:00 2001 From: Devang Gaur Date: Wed, 16 Sep 2020 23:09:34 +0530 Subject: [PATCH] Fixed error capitalization --- pkg/terraform/executor.go | 12 ++++++------ test/ingress/packet_test/match_host_test.go | 2 +- test/monitoring/components_alerts_test.go | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/pkg/terraform/executor.go b/pkg/terraform/executor.go index 9e312d859..0735861d2 100644 --- a/pkg/terraform/executor.go +++ b/pkg/terraform/executor.go @@ -516,31 +516,31 @@ func (ex *Executor) logPath(id int) string { func (ex *Executor) checkVersion() error { vOutput, err := ex.executeSync("--version") if err != nil { - return fmt.Errorf("Error checking Terraform version: %w", err) + return fmt.Errorf("error checking terraform version: %w", err) } var vStr string n, err := fmt.Sscanf(string(vOutput), "Terraform v%s\n", &vStr) if err != nil { - return fmt.Errorf("Error checking Terraform version: %w", err) + return fmt.Errorf("error checking terraform version: %w", err) } if n != 1 { - return fmt.Errorf("Parsing Terraform version failed") + return fmt.Errorf("parsing terraform version failed") } v, err := version.NewVersion(vStr) if err != nil { - return fmt.Errorf("Error checking Terraform version: %w", err) + return fmt.Errorf("error checking terraform version: %w", err) } constraints, err := version.NewConstraint(requiredVersion) if err != nil { - return fmt.Errorf("Error checking Terraform version: %w", err) + return fmt.Errorf("error checking terraform version: %w", err) } if !constraints.Check(v) { - return fmt.Errorf("Version '%s' of Terraform not supported. Needed %s", v, constraints) + return fmt.Errorf("version '%s' of terraform not supported. needed %s", v, constraints) } return nil diff --git a/test/ingress/packet_test/match_host_test.go b/test/ingress/packet_test/match_host_test.go index 508fc3b94..efd89a0a2 100644 --- a/test/ingress/packet_test/match_host_test.go +++ b/test/ingress/packet_test/match_host_test.go @@ -94,7 +94,7 @@ func checkIngressHost(client kubernetes.Interface, tc componentTestCase) wait.Co addr, err := net.LookupIP(ingHost) if err != nil { - return false, fmt.Errorf("Unknown host: %v", err) + return false, fmt.Errorf("unknown host: %v", err) } for _, v := range addr { diff --git a/test/monitoring/components_alerts_test.go b/test/monitoring/components_alerts_test.go index d8ce39cc1..d44bc1b69 100644 --- a/test/monitoring/components_alerts_test.go +++ b/test/monitoring/components_alerts_test.go @@ -118,7 +118,7 @@ func getComponentAlertRetryFunc(t *testing.T, v1api v1.API, tc alertTestCase) wa } if !reflect.DeepEqual(rules, tc.Alerts) { - return false, fmt.Errorf("Rules don't match. Expected: %#v and \ngot %#v", tc.Alerts, rules) + return false, fmt.Errorf("rules don't match. expected: %#v and \ngot %#v", tc.Alerts, rules) } return true, nil