Commit ce61e047 authored by Ramon Nou's avatar Ramon Nou
Browse files

Use general replica count variable in mutation tests

parent dbf2c07f
Loading
Loading
Loading
Loading
Loading
+4 −6
Changes for tests/integration/malleability/test_mutate_distributors_integrity.py: 4 added lines, 6 removed lines.
Original line number Diff line number Diff line
@@ -265,8 +265,7 @@ def test_random_slicing_cutshift_expand_with_replication(
    """CutShift expansion preserves data and replica copies."""
    monkeypatch.setenv("GKFS_DISTRIBUTION_STRATEGY", "random_slicing")
    monkeypatch.setenv("GKFS_RANDOM_SLICING_CUTSHIFT", "ON")
    monkeypatch.setenv("GKFS_DAEMON_NUM_REPL", "1")
    monkeypatch.setenv("LIBGKFS_NUM_REPL", "1")
    monkeypatch.setenv("GKFS_NUM_REPL", "1")

    # These fixtures are created before the test body. Update their client
    # environments explicitly after applying the test-local replication setup.
@@ -275,7 +274,7 @@ def test_random_slicing_cutshift_expand_with_replication(
            {
                "GKFS_DISTRIBUTION_STRATEGY": "random_slicing",
                "GKFS_RANDOM_SLICING_CUTSHIFT": "ON",
                "LIBGKFS_NUM_REPL": "1",
                "GKFS_NUM_REPL": "1",
            }
        )

@@ -326,15 +325,14 @@ def test_random_slicing_cutshift_shrink_with_replication(
    """CutShift shrink evacuates replicated data before host removal."""
    monkeypatch.setenv("GKFS_DISTRIBUTION_STRATEGY", "random_slicing")
    monkeypatch.setenv("GKFS_RANDOM_SLICING_CUTSHIFT", "ON")
    monkeypatch.setenv("GKFS_DAEMON_NUM_REPL", "1")
    monkeypatch.setenv("LIBGKFS_NUM_REPL", "1")
    monkeypatch.setenv("GKFS_NUM_REPL", "1")

    for env in (gkfs_client._env, gkfs_shell._env):
        env.update(
            {
                "GKFS_DISTRIBUTION_STRATEGY": "random_slicing",
                "GKFS_RANDOM_SLICING_CUTSHIFT": "ON",
                "LIBGKFS_NUM_REPL": "1",
                "GKFS_NUM_REPL": "1",
            }
        )