Skip to content

Commit f7a5158

Browse files
committed
Non-existent databases can be dropped
InfluxDB no longer raises an error when dropping a non-existing database.
1 parent 4e06277 commit f7a5158

File tree

2 files changed

+0
-12
lines changed

2 files changed

+0
-12
lines changed

influxdb/tests/client_test.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -462,12 +462,6 @@ def test_drop_numeric_named_database(self):
462462
'drop database "123"'
463463
)
464464

465-
@raises(Exception)
466-
def test_drop_database_fails(self):
467-
cli = InfluxDBClient('host', 8086, 'username', 'password', 'db')
468-
with _mocked_session(cli, 'delete', 401):
469-
cli.drop_database('old_db')
470-
471465
def test_get_list_database(self):
472466
data = {'results': [
473467
{'series': [

influxdb/tests/server_tests/client_test_with_server.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -147,12 +147,6 @@ def test_drop_database(self):
147147
self.assertIsNone(self.cli.drop_database('new_db_1'))
148148
self.assertEqual([{'name': 'new_db_2'}], self.cli.get_list_database())
149149

150-
def test_drop_database_fails(self):
151-
with self.assertRaises(InfluxDBClientError) as ctx:
152-
self.cli.drop_database('db')
153-
self.assertIn('database not found: db',
154-
ctx.exception.content)
155-
156150
def test_query_fail(self):
157151
with self.assertRaises(InfluxDBClientError) as ctx:
158152
self.cli.query('select column_one from foo')

0 commit comments

Comments
 (0)