Skip to content

Commit da5781a

Browse files
committed
Fixed error message.
1 parent 780c43f commit da5781a

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

stackinator/mirror.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ def _load_mirrors(self, cmdline_cache: Optional[str]) -> Dict[str, Dict]:
8484
mirrors['legacy_cache_cfg'] = legacy_cache
8585

8686

87-
caches = [mirror for mirror in mirrors.values() if mirror['cache']]
87+
caches = {name: mirror for name, mirror in mirrors.items() if mirror['cache']]
8888
if len(caches) > 1:
8989
raise MirrorError(
9090
"Mirror config has more than one mirror specified as the build cache destination.\n"
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
fake-mirror:
2+
url: https://google.com
3+
disabled-mirror:
4+
url: https://google.com
5+
enabled: false
6+
bootstrap-mirror:
7+
url: https://mirror.spack.io
8+
bootstrap: true

unittests/test_mirrors.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ def test_mirror_init(systems_path, valid_mirrors):
3535
def test_command_line_cache(systems_path):
3636
"""Check that adding a cache from the command line works."""
3737

38-
mirrors = mirror.Mirrors(systems_path/'mirror-ok', cmdline_cache=systems_path.as_posix())
38+
mirrors = mirror.Mirrors(systems_path/'mirror-basic', cmdline_cache=systems_path.as_posix())
3939

40-
assert len(mirrors.mirrors) == 4
40+
assert len(mirrors.mirrors) == 3
4141

4242

4343
def test_create_spack_mirrors_yaml(systems_path):

0 commit comments

Comments
 (0)