Merge pull request #7195 from falser101/feature/cleanup

test: error strings should not be capitalized
This commit is contained in:
Derek McGowan 2022-07-27 15:19:34 -07:00 committed by GitHub
commit b848924ae8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -140,28 +140,28 @@ func checkSnapshots(ctx context.Context, sn snapshots.Snapshotter, work string,
// checkInfo checks that the infos are the same // checkInfo checks that the infos are the same
func checkInfo(si1, si2 snapshots.Info) error { func checkInfo(si1, si2 snapshots.Info) error {
if si1.Kind != si2.Kind { if si1.Kind != si2.Kind {
return fmt.Errorf("Expected kind %v, got %v", si1.Kind, si2.Kind) return fmt.Errorf("expected kind %v, got %v", si1.Kind, si2.Kind)
} }
if si1.Name != si2.Name { if si1.Name != si2.Name {
return fmt.Errorf("Expected name %v, got %v", si1.Name, si2.Name) return fmt.Errorf("expected name %v, got %v", si1.Name, si2.Name)
} }
if si1.Parent != si2.Parent { if si1.Parent != si2.Parent {
return fmt.Errorf("Expected Parent %v, got %v", si1.Parent, si2.Parent) return fmt.Errorf("expected Parent %v, got %v", si1.Parent, si2.Parent)
} }
if len(si1.Labels) != len(si2.Labels) { if len(si1.Labels) != len(si2.Labels) {
return fmt.Errorf("Expected %d labels, got %d", len(si1.Labels), len(si2.Labels)) return fmt.Errorf("expected %d labels, got %d", len(si1.Labels), len(si2.Labels))
} }
for k, l1 := range si1.Labels { for k, l1 := range si1.Labels {
l2 := si2.Labels[k] l2 := si2.Labels[k]
if l1 != l2 { if l1 != l2 {
return fmt.Errorf("Expected label %v, got %v", l1, l2) return fmt.Errorf("expected label %v, got %v", l1, l2)
} }
} }
if si1.Created != si2.Created { if si1.Created != si2.Created {
return fmt.Errorf("Expected Created %v, got %v", si1.Created, si2.Created) return fmt.Errorf("expected Created %v, got %v", si1.Created, si2.Created)
} }
if si1.Updated != si2.Updated { if si1.Updated != si2.Updated {
return fmt.Errorf("Expected Updated %v, got %v", si1.Updated, si2.Updated) return fmt.Errorf("expected Updated %v, got %v", si1.Updated, si2.Updated)
} }
return nil return nil