Skip to content

Commit

Permalink
test(bigtable): Fix TestIntegration_Aggregates (#10789)
Browse files Browse the repository at this point in the history
* Update integration_test.go

* Update integration_test.go

* Update integration_test.go

* Update inmem.go

---------

Co-authored-by: Baha Aiman <[email protected]>
  • Loading branch information
ron-gal and bhshkh authored Aug 30, 2024
1 parent 16317a8 commit 633dc86
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion bigtable/bttest/inmem.go
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ func (s *server) ModifyColumnFamilies(ctx context.Context, req *btapb.ModifyColu
return nil, fmt.Errorf("no such family %q", mod.Id)
}
if cf.valueType != newcf.valueType {
return nil, status.Errorf(codes.InvalidArgument, "Immutable fields 'value_type' cannot be updated")
return nil, status.Errorf(codes.InvalidArgument, "Immutable fields 'value_type.aggregate_type' cannot be updated")
}

// assume that we ALWAYS want to replace by the new setting
Expand Down
4 changes: 2 additions & 2 deletions bigtable/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -347,11 +347,11 @@ func TestIntegration_Aggregates(t *testing.T) {
t.Fatalf("Read row mismatch.\n got %#v\nwant %#v", row, wantRow)
}

err = ac.UpdateFamily(ctx, tableName, family, Family{ValueType: Int64Type{}})
err = ac.UpdateFamily(ctx, tableName, family, Family{ValueType: StringType{}})
if err == nil {
t.Fatalf("Expected UpdateFamily to fail, but it didn't")
}
wantError := "Immutable fields 'value_type' cannot be updated"
wantError := "Immutable fields 'value_type.aggregate_type' cannot be updated"
if !strings.Contains(err.Error(), wantError) {
t.Errorf("Wrong error. Expected to containt %q but was %v", wantError, err)
}
Expand Down

0 comments on commit 633dc86

Please sign in to comment.