Skip to content

Commit c4ee468

Browse files
authored
Merge pull request #24 from kravvcu/feature/support-hyphens-in-instance-variable-values
fix: permit instance variable values to contain dashes
2 parents d239a63 + 4999a79 commit c4ee468

2 files changed

Lines changed: 7 additions & 4 deletions

File tree

gcasc/instance_variables.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,9 @@ def _validate(self, errors): # type: (ValidationResult) -> ()
9696
errors.add("must have at least 8 chars to be masked", path=path)
9797
if "\n" in value:
9898
errors.add("must be in a single line to be masked", path=path)
99-
if not bool(re.match(r"[a-zA-Z0-9+/=@:]+$", value)):
99+
if not bool(re.match(r"[a-zA-Z0-9+/=@:\-]+$", value)):
100100
errors.add(
101-
"must consist only of characters from Base64 alphabet plus '@', ':'",
101+
"must consist only of characters from Base64 alphabet plus '@', ':', '-'",
102102
path=path,
103103
)
104104
return errors

test-requirements.txt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
pytest>=5.2.4
22
pytest-cov>=2.8.1
3-
mock>=3.0.5
4-
flake8>=3.7.9
3+
4+
# pin mock version due to some weird issue
5+
# https://github.com/Roche/gitlab-configuration-as-code/runs/1736343549?check_suite_focus=true
6+
mock==4.0.2
7+
flake8>=3.7.9

0 commit comments

Comments
 (0)