|
5 | 5 | from datetime import datetime, timezone |
6 | 6 | from pathlib import Path |
7 | 7 | from .cli import ( |
8 | | - all_configured_tables_are_compatible, |
9 | 8 | migrate_cmd, |
10 | 9 | config_from_args, |
11 | 10 | do_partition, |
@@ -139,7 +138,7 @@ def test_partition_unpartitioned_table(self): |
139 | 138 | mariadb: {str(fake_exec)} |
140 | 139 | """ |
141 | 140 | ) |
142 | | - self.assertSequenceEqual(list(o), []) |
| 141 | + self.assertSequenceEqual(list(o), ["test"]) |
143 | 142 |
|
144 | 143 | def test_partition_cmd_invalid_yaml(self): |
145 | 144 | with self.assertRaises(TypeError): |
@@ -327,58 +326,6 @@ def test_stats_yaml(self): |
327 | 326 | self.assert_stats_prometheus_outfile(stats_outfile.read()) |
328 | 327 |
|
329 | 328 |
|
330 | | -class TestHelpers(unittest.TestCase): |
331 | | - def test_all_configured_tables_are_compatible_one(self): |
332 | | - args = PARSER.parse_args( |
333 | | - [ |
334 | | - "--mariadb", |
335 | | - str(fake_exec), |
336 | | - "maintain", |
337 | | - "--table", |
338 | | - "partitioned_yesterday", |
339 | | - ] |
340 | | - ) |
341 | | - config = config_from_args(args) |
342 | | - self.assertTrue(all_configured_tables_are_compatible(config)) |
343 | | - |
344 | | - def test_all_configured_tables_are_compatible_three(self): |
345 | | - args = PARSER.parse_args( |
346 | | - [ |
347 | | - "--mariadb", |
348 | | - str(fake_exec), |
349 | | - "maintain", |
350 | | - "--table", |
351 | | - "partitioned_last_week", |
352 | | - "partitioned_yesterday", |
353 | | - "othertable", |
354 | | - ] |
355 | | - ) |
356 | | - config = config_from_args(args) |
357 | | - self.assertTrue(all_configured_tables_are_compatible(config)) |
358 | | - |
359 | | - def test_all_configured_tables_are_compatible_three_one_unpartitioned(self): |
360 | | - args = PARSER.parse_args( |
361 | | - [ |
362 | | - "--mariadb", |
363 | | - str(fake_exec), |
364 | | - "maintain", |
365 | | - "--table", |
366 | | - "partitioned_last_week", |
367 | | - "unpartitioned", |
368 | | - "othertable", |
369 | | - ] |
370 | | - ) |
371 | | - config = config_from_args(args) |
372 | | - self.assertFalse(all_configured_tables_are_compatible(config)) |
373 | | - |
374 | | - def test_all_configured_tables_are_compatible_unpartitioned(self): |
375 | | - args = PARSER.parse_args( |
376 | | - ["--mariadb", str(fake_exec), "maintain", "--table", "unpartitioned"] |
377 | | - ) |
378 | | - config = config_from_args(args) |
379 | | - self.assertFalse(all_configured_tables_are_compatible(config)) |
380 | | - |
381 | | - |
382 | 329 | class TestConfig(unittest.TestCase): |
383 | 330 | def test_cli_tables_override_yaml(self): |
384 | 331 | args = PARSER.parse_args( |
|
0 commit comments