37
37
INVALID_EXTRA_USER_ROLE_BLOCKING_MESSAGE = "invalid role(s) for extra user roles"
38
38
39
39
40
- @pytest .mark .group (1 )
40
+ @pytest .mark .group ("new_relations_tests" )
41
41
@pytest .mark .abort_on_fail
42
42
async def test_deploy_charms (ops_test : OpsTest , charm ):
43
43
"""Deploy both charms (application and database) to use in the tests."""
@@ -71,7 +71,7 @@ async def test_deploy_charms(ops_test: OpsTest, charm):
71
71
await ops_test .model .wait_for_idle (apps = APP_NAMES , status = "active" , timeout = 3000 )
72
72
73
73
74
- @pytest .mark .group (1 )
74
+ @pytest .mark .group ("new_relations_tests" )
75
75
async def test_no_read_only_endpoint_in_standalone_cluster (ops_test : OpsTest ):
76
76
"""Test that there is no read-only endpoint in a standalone cluster."""
77
77
async with ops_test .fast_forward ():
@@ -118,7 +118,7 @@ async def test_no_read_only_endpoint_in_standalone_cluster(ops_test: OpsTest):
118
118
)
119
119
120
120
121
- @pytest .mark .group (1 )
121
+ @pytest .mark .group ("new_relations_tests" )
122
122
async def test_read_only_endpoint_in_scaled_up_cluster (ops_test : OpsTest ):
123
123
"""Test that there is read-only endpoint in a scaled up cluster."""
124
124
async with ops_test .fast_forward ():
@@ -136,7 +136,7 @@ async def test_read_only_endpoint_in_scaled_up_cluster(ops_test: OpsTest):
136
136
)
137
137
138
138
139
- @pytest .mark .group (1 )
139
+ @pytest .mark .group ("new_relations_tests" )
140
140
async def test_database_relation_with_charm_libraries (ops_test : OpsTest ):
141
141
"""Test basic functionality of database relation interface."""
142
142
# Get the connection string to connect to the database using the read/write endpoint.
@@ -184,7 +184,7 @@ async def test_database_relation_with_charm_libraries(ops_test: OpsTest):
184
184
cursor .execute ("DROP TABLE test;" )
185
185
186
186
187
- @pytest .mark .group (1 )
187
+ @pytest .mark .group ("new_relations_tests" )
188
188
async def test_user_with_extra_roles (ops_test : OpsTest ):
189
189
"""Test superuser actions and the request for more permissions."""
190
190
# Get the connection string to connect to the database.
@@ -205,7 +205,7 @@ async def test_user_with_extra_roles(ops_test: OpsTest):
205
205
connection .close ()
206
206
207
207
208
- @pytest .mark .group (1 )
208
+ @pytest .mark .group ("new_relations_tests" )
209
209
async def test_two_applications_doesnt_share_the_same_relation_data (ops_test : OpsTest ):
210
210
"""Test that two different application connect to the database with different credentials."""
211
211
# Set some variables to use in this test.
@@ -259,7 +259,7 @@ async def test_two_applications_doesnt_share_the_same_relation_data(ops_test: Op
259
259
psycopg2 .connect (connection_string )
260
260
261
261
262
- @pytest .mark .group (1 )
262
+ @pytest .mark .group ("new_relations_tests" )
263
263
async def test_an_application_can_connect_to_multiple_database_clusters (ops_test : OpsTest ):
264
264
"""Test that an application can connect to different clusters of the same database."""
265
265
# Relate the application with both database clusters
@@ -290,7 +290,7 @@ async def test_an_application_can_connect_to_multiple_database_clusters(ops_test
290
290
assert application_connection_string != another_application_connection_string
291
291
292
292
293
- @pytest .mark .group (1 )
293
+ @pytest .mark .group ("new_relations_tests" )
294
294
async def test_an_application_can_connect_to_multiple_aliased_database_clusters (ops_test : OpsTest ):
295
295
"""Test that an application can connect to different clusters of the same database."""
296
296
# Relate the application with both database clusters
@@ -324,7 +324,7 @@ async def test_an_application_can_connect_to_multiple_aliased_database_clusters(
324
324
assert application_connection_string != another_application_connection_string
325
325
326
326
327
- @pytest .mark .group (1 )
327
+ @pytest .mark .group ("new_relations_tests" )
328
328
async def test_an_application_can_request_multiple_databases (ops_test : OpsTest ):
329
329
"""Test that an application can request additional databases using the same interface."""
330
330
# Relate the charms using another relation and wait for them exchanging some connection data.
@@ -345,7 +345,7 @@ async def test_an_application_can_request_multiple_databases(ops_test: OpsTest):
345
345
assert first_database_connection_string != second_database_connection_string
346
346
347
347
348
- @pytest .mark .group (1 )
348
+ @pytest .mark .group ("new_relations_tests" )
349
349
@pytest .mark .abort_on_fail
350
350
async def test_relation_data_is_updated_correctly_when_scaling (ops_test : OpsTest ):
351
351
"""Test that relation data, like connection data, is updated correctly when scaling."""
@@ -424,7 +424,7 @@ async def test_relation_data_is_updated_correctly_when_scaling(ops_test: OpsTest
424
424
psycopg2 .connect (primary_connection_string )
425
425
426
426
427
- @pytest .mark .group (1 )
427
+ @pytest .mark .group ("new_relations_tests" )
428
428
async def test_relation_with_no_database_name (ops_test : OpsTest ):
429
429
"""Test that a relation with no database name doesn't block the charm."""
430
430
async with ops_test .fast_forward ():
@@ -441,7 +441,7 @@ async def test_relation_with_no_database_name(ops_test: OpsTest):
441
441
await ops_test .model .wait_for_idle (apps = APP_NAMES , status = "active" , raise_on_blocked = True )
442
442
443
443
444
- @pytest .mark .group (1 )
444
+ @pytest .mark .group ("new_relations_tests" )
445
445
async def test_admin_role (ops_test : OpsTest ):
446
446
"""Test that the admin role gives access to all the databases."""
447
447
all_app_names = [DATA_INTEGRATOR_APP_NAME ]
@@ -524,7 +524,7 @@ async def test_admin_role(ops_test: OpsTest):
524
524
connection .close ()
525
525
526
526
527
- @pytest .mark .group (1 )
527
+ @pytest .mark .group ("new_relations_tests" )
528
528
async def test_invalid_extra_user_roles (ops_test : OpsTest ):
529
529
async with ops_test .fast_forward ():
530
530
# Remove the relation between the database and the first data integrator.
@@ -586,7 +586,7 @@ async def test_invalid_extra_user_roles(ops_test: OpsTest):
586
586
)
587
587
588
588
589
- @pytest .mark .group (2 )
589
+ @pytest .mark .group ("nextcloud_blocked" )
590
590
@markers .amd64_only # nextcloud charm not available for arm64
591
591
async def test_nextcloud_db_blocked (ops_test : OpsTest , charm : str ) -> None :
592
592
# Deploy Database Charm and Nextcloud
0 commit comments