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 5
5
send_request_when_resource_available ,
6
6
wait_for_condition ,
7
7
)
8
+ from test .integration .models .database .helpers import (
9
+ get_db_engine_id ,
10
+ get_postgres_db_status ,
11
+ get_sql_db_status ,
12
+ )
8
13
9
14
import pytest
10
15
11
- from linode_api4 import LinodeClient
12
16
from linode_api4 .objects import MySQLDatabase , PostgreSQLDatabase
13
17
14
18
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
-
36
19
@pytest .fixture (scope = "session" )
37
20
def test_create_sql_db (test_linode_client ):
38
21
client = test_linode_client
You can’t perform that action at this time.
0 commit comments