Skip to content

Commit f435b7f

Browse files
committed
Add test
1 parent 67bb871 commit f435b7f

File tree

2 files changed

+12
-6
lines changed

2 files changed

+12
-6
lines changed

lib/ramble/ramble/test/when.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,7 @@
1111
import ramble.workspace
1212
from ramble.main import RambleCommand
1313

14-
pytestmark = pytest.mark.usefixtures(
15-
"mutable_config", "mutable_mock_workspace_path", "mutable_mock_apps_repo", "mock_modifiers"
16-
)
14+
pytestmark = pytest.mark.usefixtures("mutable_mock_workspace_path", "mutable_mock_apps_repo")
1715

1816
config = RambleCommand("config")
1917
workspace = RambleCommand("workspace")
@@ -40,9 +38,17 @@ def test_register_phase_when(request):
4038
global_args=global_args,
4139
)
4240

43-
config("add", "variants:when_phase:true", global_args=global_args)
41+
config("add", "variants:register_phase_when:true", global_args=global_args)
4442

4543
ws._re_read()
4644
output = workspace("setup", "--dry-run", global_args=global_args)
4745

4846
assert "Test Phase" in output
47+
48+
config("remove", "variants:register_phase_when:true", global_args=global_args)
49+
config("add", "variants:register_phase_when:false", global_args=global_args)
50+
51+
ws._re_read()
52+
output = workspace("setup", "--dry-run", global_args=global_args)
53+
54+
assert "Test Phase" not in output

var/ramble/repos/builtin.mock/applications/when-directives/application.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,13 @@ class WhenDirectives(ExecutableApplication):
2424
)
2525

2626
variant(
27-
"when_phase",
27+
"register_phase_when",
2828
default=False,
2929
values=[True, False],
3030
description="Register additional phase using when",
3131
)
3232

33-
with when("+when_phase"):
33+
with when("+register_phase_when"):
3434
register_phase(
3535
"test_phase",
3636
pipeline="setup",

0 commit comments

Comments
 (0)