Skip to content

Commit

Permalink
Update e2e test
Browse files Browse the repository at this point in the history
Signed-off-by: Matt Lord <[email protected]>
  • Loading branch information
mattlord committed Jun 13, 2024
1 parent 10b5627 commit c000f07
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion go/test/endtoend/vreplication/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ create table nopk (name varchar(128), age int unsigned);
],
"auto_increment": {
"column": "cid",
"sequence": "customer_seq"
"sequence": "` + "`customer_seq`" + `"
}
},
"customer_name": {
Expand Down
2 changes: 2 additions & 0 deletions go/vt/vtctl/workflow/traffic_switcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -1387,6 +1387,7 @@ func (ts *trafficSwitcher) getTargetSequenceMetadata(ctx context.Context) (map[s
}
var err error
for tableName, tableDef := range kvs.Tables {
// The table name can be escaped in the vschema definition.
if tableName, err = sqlescape.UnescapeID(tableName); err != nil {
return err
}
Expand Down Expand Up @@ -1433,6 +1434,7 @@ func (ts *trafficSwitcher) getTargetSequenceMetadata(ctx context.Context) (map[s
searchGroup, gctx := errgroup.WithContext(ctx)
searchCompleted := make(chan struct{})
for _, keyspace := range keyspaces {
// The keyspace name can be escaped in the vschema definition.
keyspace, err := sqlescape.UnescapeID(keyspace)
if err != nil {
return nil, err
Expand Down
3 changes: 0 additions & 3 deletions go/vt/vtctl/workflow/traffic_switcher_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,6 @@ func TestGetTargetSequenceMetadata(t *testing.T) {
},
},
},
// key: ```my-seq1```, value: &{```my-seq1``` ```source-ks``` vt_`source-ks` t1 vt_targetks 0x14000758640}
// column_vindexes:{column:"`my-col`" name:"xxhash"} auto_increment:{column:"`my-col`" sequence:"`source-ks`.`my-seq1`"}
want: map[string]*sequenceMetadata{
"my-seq1": {
backingTableName: "my-seq1",
Expand Down Expand Up @@ -204,7 +202,6 @@ func TestGetTargetSequenceMetadata(t *testing.T) {
sources: sources,
targets: targets,
}
//t.Logf("DEBUG: ts: %+v", ts)
got, err := ts.getTargetSequenceMetadata(ctx)
if tc.err != "" {
require.EqualError(t, err, tc.err)
Expand Down

0 comments on commit c000f07

Please sign in to comment.