Skip to content
This repository was archived by the owner on Jun 8, 2026. It is now read-only.
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add test for invalid UpdateDatabaseRequest.
  • Loading branch information
aayushimalik committed Apr 12, 2023
commit b27fd76612fd7463a103058769aa1e90876a98e6
11 changes: 10 additions & 1 deletion tests/system/test_database_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -564,7 +564,7 @@ def _unit_of_work(transaction, name):
assert len(rows) == 2


def test_update_database(
def test_update_database_success(
not_emulator, shared_database, shared_instance, database_operation_timeout
):
old_protection = shared_database.enable_drop_protection
Expand Down Expand Up @@ -592,3 +592,12 @@ def test_update_database(
# other test cases.
shared_database.enable_drop_protection = old_protection
shared_database.update(["enable_drop_protection"])

def test_update_database_invalid(
not_emulator, shared_database
):
shared_database.enable_drop_protection = True

# Empty `fields` is not supported.
with pytest.raises(exceptions.InvalidArgument):
shared_database.update([])
Comment thread
aayushimalik marked this conversation as resolved.
Outdated