File tree Expand file tree Collapse file tree 1 file changed +5
-22
lines changed
test/integration/models/database Expand file tree Collapse file tree 1 file changed +5
-22
lines changed Original file line number Diff line number Diff line change 55 send_request_when_resource_available ,
66 wait_for_condition ,
77)
8+ from test .integration .models .database .helpers import (
9+ get_db_engine_id ,
10+ get_postgres_db_status ,
11+ get_sql_db_status ,
12+ )
813
914import pytest
1015
11- from linode_api4 import LinodeClient
1216from linode_api4 .objects import MySQLDatabase , PostgreSQLDatabase
1317
1418
15- # Test Helpers
16- def get_db_engine_id (client : LinodeClient , engine : str ):
17- engines = client .database .engines ()
18- engine_id = ""
19- for e in engines :
20- if e .engine == engine :
21- engine_id = e .id
22-
23- return str (engine_id )
24-
25-
26- def get_sql_db_status (client : LinodeClient , db_id , status : str ):
27- db = client .load (MySQLDatabase , db_id )
28- return db .status == status
29-
30-
31- def get_postgres_db_status (client : LinodeClient , db_id , status : str ):
32- db = client .load (PostgreSQLDatabase , db_id )
33- return db .status == status
34-
35-
3619@pytest .fixture (scope = "session" )
3720def test_create_sql_db (test_linode_client ):
3821 client = test_linode_client
You can’t perform that action at this time.
0 commit comments