From 524b6f4543af1a6c6b2d5afa950b3c76f5a51b66 Mon Sep 17 00:00:00 2001 From: David Piegza <697113+davidpiegza@users.noreply.github.com> Date: Tue, 29 Aug 2023 13:49:14 +0000 Subject: [PATCH] Add test for dropping non-existing sequence Signed-off-by: David Piegza <697113+davidpiegza@users.noreply.github.com> --- go/vt/vtgate/executor_vschema_ddl_test.go | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/go/vt/vtgate/executor_vschema_ddl_test.go b/go/vt/vtgate/executor_vschema_ddl_test.go index e40cb723257..805d99170eb 100644 --- a/go/vt/vtgate/executor_vschema_ddl_test.go +++ b/go/vt/vtgate/executor_vschema_ddl_test.go @@ -426,14 +426,13 @@ func TestExecutorDropSequenceDDL(t *testing.T) { _, err = executor.Execute(context.Background(), "TestExecute", session, stmt, nil) require.NoError(t, err) - // Should fail adding a table on a sharded keyspace - ksSharded := "TestExecutor" - session = NewSafeSession(&vtgatepb.Session{TargetString: ksSharded}) + // Should fail dropping a non-existing test sequence + session = NewSafeSession(&vtgatepb.Session{TargetString: ks}) - stmt = "alter vschema add sequence sequence_table" + stmt = "alter vschema drop sequence test_seq" _, err = executor.Execute(context.Background(), "TestExecute", session, stmt, nil) - wantErr := "add sequence table: unsupported on sharded keyspace TestExecutor" + wantErr := "vschema does not contain sequence test_seq in keyspace TestUnsharded" if err == nil || err.Error() != wantErr { t.Errorf("want error %v got %v", wantErr, err) }