Skip to content

Commit 93a7313

Browse files
committed
remove legacy marks
1 parent 8facbe9 commit 93a7313

13 files changed

+2
-76
lines changed

tests/integration/ha/test_ha.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,6 @@
5151
BROKER_PORT = SECURITY_PROTOCOL_PORTS["SASL_PLAINTEXT", "SCRAM-SHA-512"].client
5252

5353

54-
@pytest.mark.skip_if_deployed
55-
@pytest.mark.abort_on_fail
5654
def test_build_and_deploy(juju: jubilant.Juju, kafka_charm, app_charm, kraft_mode, kafka_apps):
5755
deploy_cluster(
5856
juju=juju,

tests/integration/ha/test_ha_controller.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,6 @@ def raise_if_not_kraft_multi(kraft_mode: KRaftMode):
5151
raise Exception("Controller HA tests should only run with --kraft-mode=multi")
5252

5353

54-
@pytest.mark.skip_if_deployed
55-
@pytest.mark.abort_on_fail
5654
def test_deploy_active(juju: jubilant.Juju, kafka_charm, app_charm, kafka_apps):
5755
deploy_cluster(
5856
juju=juju,
@@ -249,7 +247,6 @@ def test_full_cluster_restart(
249247
assert_quorum_lag_is_zero(juju=juju)
250248

251249

252-
@pytest.mark.abort_on_fail
253250
def test_network_cut_without_ip_change(
254251
juju: jubilant.Juju,
255252
c_writes: ContinuousWrites,

tests/integration/test_auto_balance.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
import time
33

44
import jubilant
5-
import pytest
65

76
from integration.ha.continuous_writes import ContinuousWrites
87
from integration.helpers import (
@@ -46,8 +45,6 @@ def _assert_partitions_rebalanced(model: str, num_brokers: int, timeout: int = 1
4645
raise TimeoutError(f"Partition rebalance assertion failed after {timeout} seconds")
4746

4847

49-
@pytest.mark.skip_if_deployed
50-
@pytest.mark.abort_on_fail
5148
def test_build_and_deploy(
5249
juju: jubilant.Juju,
5350
kafka_charm,

tests/integration/test_balancer.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,6 @@ class TestBalancer:
4141
deployment_strat: str = os.environ.get("DEPLOYMENT", "multi")
4242
balancer_app: str = {"single": APP_NAME, "multi": CONTROLLER_NAME}[deployment_strat]
4343

44-
@pytest.mark.abort_on_fail
45-
@pytest.mark.skip_if_deployed
4644
def test_build_and_deploy(self, juju: jubilant.Juju, kafka_charm):
4745

4846
juju.deploy(
@@ -100,7 +98,6 @@ def test_build_and_deploy(self, juju: jubilant.Juju, kafka_charm):
10098
assert status.apps[CONTROLLER_NAME].app_status.current == "blocked"
10199
assert status.apps[self.balancer_app].app_status.current == "blocked"
102100

103-
@pytest.mark.abort_on_fail
104101
def test_relate_not_enough_brokers(self, juju: jubilant.Juju):
105102
juju.integrate(
106103
f"{APP_NAME}:{PEER_CLUSTER_ORCHESTRATOR_RELATION}",
@@ -124,7 +121,6 @@ def test_relate_not_enough_brokers(self, juju: jubilant.Juju):
124121
with pytest.raises(CalledProcessError):
125122
assert balancer_is_running(model_full_name=juju.model, app_name=self.balancer_app)
126123

127-
@pytest.mark.abort_on_fail
128124
def test_minimum_brokers_balancer_starts(self, juju: jubilant.Juju):
129125
juju.add_unit(APP_NAME, num_units=2)
130126
time.sleep(60)
@@ -141,15 +137,12 @@ def test_minimum_brokers_balancer_starts(self, juju: jubilant.Juju):
141137
assert balancer_is_running(model_full_name=juju.model, app_name=self.balancer_app)
142138
assert balancer_is_secure(juju, app_name=self.balancer_app)
143139

144-
@pytest.mark.abort_on_fail
145140
def test_balancer_exporter_endpoints(self, juju: jubilant.Juju):
146141
assert balancer_exporter_is_up(juju.model, self.balancer_app)
147142

148-
@pytest.mark.abort_on_fail
149143
def test_balancer_monitor_state(self, juju: jubilant.Juju):
150144
assert balancer_is_ready(juju=juju, app_name=self.balancer_app)
151145

152-
@pytest.mark.abort_on_fail
153146
@pytest.mark.skipif(
154147
deployment_strat == "single", reason="Testing full rebalance on large deployment"
155148
)
@@ -185,7 +178,6 @@ def test_add_unit_full_rebalance(self, juju: jubilant.Juju):
185178
get_replica_count_by_broker_id(juju, self.balancer_app).get(str(new_broker_id), 0)
186179
) # replicas were successfully moved
187180

188-
@pytest.mark.abort_on_fail
189181
@pytest.mark.skipif(
190182
deployment_strat == "multi", reason="Testing full rebalance on single-app deployment"
191183
)
@@ -226,7 +218,6 @@ def test_add_unit_targeted_rebalance(self, juju: jubilant.Juju):
226218
get_replica_count_by_broker_id(juju, self.balancer_app).get(str(new_broker_id), 0)
227219
) # replicas were successfully moved
228220

229-
@pytest.mark.abort_on_fail
230221
@pytest.mark.skipif(
231222
deployment_strat == "multi", reason="Testing full rebalance on single-app deployment"
232223
)
@@ -270,7 +261,6 @@ def test_balancer_prepare_unit_removal(self, juju: jubilant.Juju):
270261
get_replica_count_by_broker_id(juju, self.balancer_app).get(str(new_broker_id), 0)
271262
)
272263

273-
@pytest.mark.abort_on_fail
274264
def test_tls(self, juju: jubilant.Juju):
275265
# deploy and integrate tls
276266
tls_config = {"ca-common-name": "kafka"}

tests/integration/test_charm.py

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,6 @@
4040
pytestmark = pytest.mark.broker
4141

4242

43-
@pytest.mark.abort_on_fail
44-
@pytest.mark.skip_if_deployed
4543
def test_build_and_deploy(juju: jubilant.Juju, kafka_charm, kraft_mode, controller_app):
4644
juju.cli("create-storage-pool", "test_pool", "lxd")
4745

@@ -60,14 +58,12 @@ def test_build_and_deploy(juju: jubilant.Juju, kafka_charm, kraft_mode, controll
6058
)
6159

6260

63-
@pytest.mark.abort_on_fail
6461
def test_consistency_between_workload_and_metadata(juju: jubilant.Juju):
6562
with open("refresh_versions.toml", "r") as f:
6663
data = toml.load(f)
6764
assert juju.status().apps[APP_NAME].version == data["workload"]
6865

6966

70-
@pytest.mark.abort_on_fail
7167
def test_remove_controller_relation_relate(juju: jubilant.Juju, kraft_mode, controller_app):
7268
if kraft_mode == "single":
7369
logger.info(f"Skipping because we're using {kraft_mode} mode.")
@@ -96,7 +92,6 @@ def test_remove_controller_relation_relate(juju: jubilant.Juju, kraft_mode, cont
9692
)
9793

9894

99-
@pytest.mark.abort_on_fail
10095
def test_listeners(juju: jubilant.Juju, app_charm, kafka_apps):
10196
address = get_address(juju=juju)
10297
assert check_socket(
@@ -145,7 +140,6 @@ def test_listeners(juju: jubilant.Juju, app_charm, kafka_apps):
145140
)
146141

147142

148-
@pytest.mark.abort_on_fail
149143
def test_client_properties_makes_admin_connection(juju: jubilant.Juju, kafka_apps, kraft_mode):
150144
juju.integrate(APP_NAME, f"{DUMMY_NAME}:{REL_NAME_ADMIN}")
151145

@@ -178,7 +172,6 @@ def test_client_properties_makes_admin_connection(juju: jubilant.Juju, kafka_app
178172
)
179173

180174

181-
@pytest.mark.abort_on_fail
182175
def test_logs_write_to_storage(juju: jubilant.Juju, kafka_apps):
183176
juju.integrate(APP_NAME, f"{DUMMY_NAME}:{REL_NAME_ADMIN}")
184177
juju.wait(
@@ -216,15 +209,13 @@ def test_rack_awareness_integration(juju: jubilant.Juju):
216209
)
217210

218211

219-
@pytest.mark.abort_on_fail
220212
def test_exporter_endpoints(juju: jubilant.Juju):
221213
unit_address = get_address(juju=juju)
222214
jmx_exporter_url = f"http://{unit_address}:{JMX_EXPORTER_PORT}/metrics"
223215
jmx_resp = requests.get(jmx_exporter_url)
224216
assert jmx_resp.ok
225217

226218

227-
@pytest.mark.abort_on_fail
228219
def test_auxiliary_paths(juju: jubilant.Juju):
229220
for path in PATHS["kafka"]:
230221
result = subprocess.check_output(
@@ -240,7 +231,6 @@ def test_auxiliary_paths(juju: jubilant.Juju):
240231
assert int(match.group(1)) > 0
241232

242233

243-
@pytest.mark.abort_on_fail
244234
def test_log_level_change(juju: jubilant.Juju, kafka_apps):
245235
status = juju.status()
246236
for unit in status.apps[APP_NAME].units:
@@ -284,7 +274,6 @@ def test_log_level_change(juju: jubilant.Juju, kafka_apps):
284274
)
285275

286276

287-
@pytest.mark.abort_on_fail
288277
@pytest.mark.skip(reason="skipping as we can't add storage without losing Juju conn")
289278
def test_logs_write_to_new_storage(juju: jubilant.Juju):
290279
check_output(
@@ -303,7 +292,6 @@ def test_logs_write_to_new_storage(juju: jubilant.Juju):
303292
)
304293

305294

306-
@pytest.mark.abort_on_fail
307295
@pytest.mark.fails_in_kafka4
308296
@pytest.mark.skip(reason="storage format command fails in KRaft mode")
309297
def test_deploy_with_existing_storage(juju: jubilant.Juju, kafka_apps):

tests/integration/test_kraft.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,6 @@ def _assert_quorum_healthy(self, juju: jubilant.Juju):
9292
else:
9393
assert status == KRaftUnitStatus.OBSERVER
9494

95-
@pytest.mark.abort_on_fail
96-
@pytest.mark.skip_if_deployed
9795
def test_build_and_deploy(self, juju: jubilant.Juju, kafka_charm, app_charm, kraft_mode):
9896

9997
juju.deploy(
@@ -140,7 +138,6 @@ def test_build_and_deploy(self, juju: jubilant.Juju, kafka_charm, app_charm, kra
140138
timeout=1800,
141139
)
142140

143-
@pytest.mark.abort_on_fail
144141
def test_integrate(self, juju: jubilant.Juju, kafka_apps):
145142
if self.controller_app != APP_NAME:
146143
juju.integrate(
@@ -165,19 +162,16 @@ def test_integrate(self, juju: jubilant.Juju, kafka_apps):
165162
timeout=900,
166163
)
167164

168-
@pytest.mark.abort_on_fail
169165
def test_listeners(self, juju: jubilant.Juju):
170166
self._assert_listeners_accessible(juju)
171167

172-
@pytest.mark.abort_on_fail
173168
def test_authorizer(self, juju: jubilant.Juju):
174169

175170
address = get_address(juju=juju)
176171
port = SECURITY_PROTOCOL_PORTS["SASL_SSL", "SCRAM-SHA-512"].internal
177172

178173
create_test_topic(juju, f"{address}:{port}")
179174

180-
@pytest.mark.abort_on_fail
181175
def test_scale_out(self, juju: jubilant.Juju):
182176
juju.add_unit(self.controller_app, num_units=2)
183177

@@ -213,7 +207,6 @@ def test_scale_out(self, juju: jubilant.Juju):
213207
juju, broker_unit_num=unit_num, controller_unit_num=unit_num
214208
)
215209

216-
@pytest.mark.abort_on_fail
217210
@pytest.mark.skipif(tls_enabled, reason="Not required with TLS test.")
218211
def test_leader_change(self, juju: jubilant.Juju):
219212
juju.remove_unit(f"{self.controller_app}/0")
@@ -257,7 +250,6 @@ def test_leader_change(self, juju: jubilant.Juju):
257250
assert (offset + 3) in unit_status
258251
assert unit_status[offset + 3] == KRaftUnitStatus.FOLLOWER
259252

260-
@pytest.mark.abort_on_fail
261253
@pytest.mark.skipif(tls_enabled, reason="Not required with TLS test.")
262254
def test_scale_in(self, juju: jubilant.Juju):
263255
for unit_id in (1, 2):
@@ -286,7 +278,6 @@ def test_scale_in(self, juju: jubilant.Juju):
286278
)
287279

288280
@pytest.mark.skipif(not tls_enabled, reason="only required when TLS is on.")
289-
@pytest.mark.abort_on_fail
290281
def test_relate_peer_tls(self, juju: jubilant.Juju):
291282
# This test and the following one are inherently long due to double rolling restarts,
292283
# In order not to break on constrained CI, we decrease the produce rate of CW to 2/s.
@@ -332,7 +323,6 @@ def test_relate_peer_tls(self, juju: jubilant.Juju):
332323
assert_continuous_writes_consistency(results)
333324

334325
@pytest.mark.skipif(not tls_enabled, reason="only required when TLS is on.")
335-
@pytest.mark.abort_on_fail
336326
def test_remove_peer_tls_relation(self, juju: jubilant.Juju):
337327
c_writes = ContinuousWrites(model=juju.model, app=DUMMY_NAME, produce_rate=2)
338328
c_writes.start()

tests/integration/test_password_rotation.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@
2626
REL_NAME_ADMIN = "kafka-client-admin"
2727

2828

29-
@pytest.mark.abort_on_fail
30-
@pytest.mark.skip_if_deployed
3129
def test_build_and_deploy(juju: jubilant.Juju, kraft_mode, kafka_charm, app_charm, kafka_apps):
3230
deploy_cluster(
3331
juju=juju,

tests/integration/test_provider.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,6 @@
3838
NON_REL_USERS = set(INTERNAL_USERS + [CONTROLLER_USER])
3939

4040

41-
@pytest.mark.abort_on_fail
42-
@pytest.mark.skip_if_deployed
4341
def test_deploy_charms_relate_active(
4442
juju: jubilant.Juju, kraft_mode, kafka_charm, app_charm, kafka_apps, usernames: set[str]
4543
):
@@ -79,7 +77,6 @@ def test_deploy_charms_relate_active(
7977
assert acl.resource_name == "test-prefix"
8078

8179

82-
@pytest.mark.abort_on_fail
8380
def test_deploy_multiple_charms_same_topic_relate_active(
8481
juju: jubilant.Juju, app_charm, kafka_apps, usernames: set[str]
8582
):
@@ -109,7 +106,6 @@ def test_deploy_multiple_charms_same_topic_relate_active(
109106
assert acl.resource_name == "test-topic"
110107

111108

112-
@pytest.mark.abort_on_fail
113109
def test_remove_application_removes_user_and_acls(
114110
juju: jubilant.Juju, kafka_apps, usernames: set[str]
115111
):
@@ -141,7 +137,6 @@ def test_remove_application_removes_user_and_acls(
141137
)
142138

143139

144-
@pytest.mark.abort_on_fail
145140
def test_deploy_producer_same_topic(
146141
juju: jubilant.Juju, app_charm, kafka_apps, usernames: set[str]
147142
):
@@ -182,7 +177,6 @@ def test_deploy_producer_same_topic(
182177
)
183178

184179

185-
@pytest.mark.abort_on_fail
186180
def test_admin_added_to_super_users(juju: jubilant.Juju, app_charm, kafka_apps):
187181
"""Test relation with admin privileges."""
188182
super_users = load_super_users(model_full_name=juju.model)
@@ -203,7 +197,6 @@ def test_admin_added_to_super_users(juju: jubilant.Juju, app_charm, kafka_apps):
203197
assert len(super_users) == 4
204198

205199

206-
@pytest.mark.abort_on_fail
207200
def test_admin_removed_from_super_users(juju: jubilant.Juju, kafka_apps):
208201
"""Test that removal of the relation with admin privileges."""
209202
juju.remove_application(DUMMY_NAME_1)
@@ -224,7 +217,6 @@ def test_admin_removed_from_super_users(juju: jubilant.Juju, kafka_apps):
224217
time.sleep(30)
225218

226219

227-
@pytest.mark.abort_on_fail
228220
def test_prefixed_topic_creation(juju: jubilant.Juju, app_charm, kafka_apps):
229221
juju.deploy(
230222
app_charm,
@@ -246,7 +238,6 @@ def test_prefixed_topic_creation(juju: jubilant.Juju, app_charm, kafka_apps):
246238
assert response.results.get("success", None) == "TRUE"
247239

248240

249-
@pytest.mark.abort_on_fail
250241
def test_connection_updated_on_tls_enabled(juju: jubilant.Juju, app_charm, kafka_apps):
251242
"""Test relation when TLS is enabled."""
252243
# adding new app unit to validate

tests/integration/test_provider_v1.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,6 @@ def _assert_acl_integrity(juju: jubilant.Juju):
128128
)
129129

130130

131-
@pytest.mark.abort_on_fail
132-
@pytest.mark.skip_if_deployed
133131
def test_deploy_and_relate(
134132
juju: jubilant.Juju, kafka_charm, app_charm, kraft_mode, kafka_apps
135133
) -> None:

tests/integration/test_refresh.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
pytestmark = pytest.mark.broker
2727

2828

29-
@pytest.mark.abort_on_fail
3029
def test_in_place_upgrade(juju: jubilant.Juju, kafka_charm, app_charm, kraft_mode, controller_app):
3130
deploy_cluster(juju=juju, charm=kafka_charm, kraft_mode=kraft_mode, num_broker=3)
3231
juju.deploy(app_charm, app=DUMMY_NAME, num_units=1, base=BASE)
@@ -95,7 +94,6 @@ def test_in_place_upgrade(juju: jubilant.Juju, kafka_charm, app_charm, kraft_mod
9594
)
9695

9796

98-
@pytest.mark.abort_on_fail
9997
def test_controller_upgrade_multinode(
10098
juju: jubilant.Juju, kafka_charm, kraft_mode, controller_app
10199
):

0 commit comments

Comments
 (0)