Skip to content

Commit

Permalink
fix: test
Browse files Browse the repository at this point in the history
getting read-only errors even after running `sys_db.set_mode("default")`. Probably sync issues..
  • Loading branch information
aMahanna committed Dec 30, 2023
1 parent 39b197f commit 5a24107
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions tests/test_database.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,15 +143,8 @@ def test_database_misc_methods(sys_db, db, bad_db, cluster):
db.set_mode("readonly")
assert err.value.error_code in {11, 1228}

sys_db.set_mode("readonly")
assert db.mode() == "readonly"

with assert_raises(DatabaseCreateError):
# Should fail because of read-only mode
sys_db.create_database("test")
assert err.value.error_code in {11, 1228}

sys_db.set_mode("default")
result = sys_db.set_mode("default")
assert result == {"mode": "default"}

# Test get server status
status = db.status()
Expand Down

0 comments on commit 5a24107

Please sign in to comment.