Skip to content

Commit

Permalink
fix: cean up created users
Browse files Browse the repository at this point in the history
  • Loading branch information
oh2024 committed May 31, 2024
1 parent cb7661a commit a2770ec
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/cmd/sql_cmd_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,10 @@ TEST_P(DBSDKTest, TestGrantCreateUser) {
router->ExecuteSQL(absl::StrCat("DROP USER user2"), &status);
ASSERT_FALSE(status.IsOK());
}
sr->ExecuteSQL(absl::StrCat("DROP USER IF EXISTS user1"), &status);
ASSERT_TRUE(status.IsOK());
sr->ExecuteSQL(absl::StrCat("DROP USER IF EXISTS user2"), &status);
ASSERT_TRUE(status.IsOK());
}

TEST_P(DBSDKTest, TestGrantCreateUserGrantOption) {
Expand Down Expand Up @@ -384,6 +388,10 @@ TEST_P(DBSDKTest, TestGrantCreateUserGrantOption) {
router->ExecuteSQL(absl::StrCat("GRANT CREATE USER ON *.* TO 'user2@%'"), &status);
ASSERT_TRUE(status.IsOK());
}
sr->ExecuteSQL(absl::StrCat("DROP USER IF EXISTS user1"), &status);
ASSERT_TRUE(status.IsOK());
sr->ExecuteSQL(absl::StrCat("DROP USER IF EXISTS user2"), &status);
ASSERT_TRUE(status.IsOK());
}

TEST_P(DBSDKTest, CreateDatabase) {
Expand Down

0 comments on commit a2770ec

Please sign in to comment.