-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #660 from linsword13/default-shell
Change default shell to bash
- Loading branch information
Showing
4 changed files
with
37 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# Copyright 2022-2024 The Ramble Authors | ||
# | ||
# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or | ||
# https://www.apache.org/licenses/LICENSE-2.0> or the MIT license | ||
# <LICENSE-MIT or https://opensource.org/licenses/MIT>, at your | ||
# option. This file may not be copied, modified, or distributed | ||
# except according to those terms. | ||
|
||
import ramble.config | ||
|
||
|
||
# A crude assertion to check there's no conflicting value. | ||
# It supports only list and dict as containers, instead of | ||
# the more general abstract types. | ||
def _assert_no_conflict_recurse(a, b): | ||
if a is None or b is None: | ||
return | ||
if isinstance(a, dict): | ||
for k, v in a.items(): | ||
_assert_no_conflict_recurse(v, b.get(k)) | ||
elif isinstance(a, list): | ||
for i, v in enumerate(a): | ||
_assert_no_conflict_recurse(v, b[i]) | ||
else: | ||
assert a == b | ||
|
||
|
||
def test_default_configs_no_conflict(default_config): | ||
"""Ensure the hard-coded config_defaults do not conflict with etc/defaults/config.yaml""" | ||
defaults_in_mem = ramble.config.config_defaults["config"] | ||
assert defaults_in_mem | ||
for k, v in defaults_in_mem.items(): | ||
in_file_def = ramble.config.get(f"config:{k}") | ||
_assert_no_conflict_recurse(v, in_file_def) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters