-
Notifications
You must be signed in to change notification settings - Fork 69
Expand file tree
/
Copy path.envrc.validate
More file actions
45 lines (36 loc) · 1.39 KB
/
.envrc.validate
File metadata and controls
45 lines (36 loc) · 1.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# Ensure that expected .envrc.private variables are defined
function expect_envvar() {
varname=$1
missing=()
for varname in "$@"; do
if ! declare -p "${varname}" &>/dev/null; then
missing+=("${varname}")
fi
done
if (( ${#missing[@]} != 0 )); then
msg="Some private environment variable(s) undefined and may cause certain tests to not succeed locally:"
for varname in "${missing[@]}"; do
msg="${msg}\n* ${varname}"
done
msg="${msg}\n\nThese should be in .envrc.private.\nSee https://github.com/DACH-NY/canton-network-node#private-environment-variables for details"
_warning "${msg}"
fi
}
if [[ -z "$IGNORE_PRIVATE_ENVRC" ]]; then
# Expected
expect_envvar \
AUTH0_CN_MANAGEMENT_API_CLIENT_ID \
AUTH0_CN_MANAGEMENT_API_CLIENT_SECRET \
AUTH0_SV_MANAGEMENT_API_CLIENT_ID \
AUTH0_SV_MANAGEMENT_API_CLIENT_SECRET \
AUTH0_VALIDATOR_MANAGEMENT_API_CLIENT_ID \
AUTH0_VALIDATOR_MANAGEMENT_API_CLIENT_SECRET \
AUTH0_TESTS_MANAGEMENT_API_CLIENT_ID \
AUTH0_TESTS_MANAGEMENT_API_CLIENT_SECRET \
ARTIFACTORY_USER \
ARTIFACTORY_PASSWORD
fi
if [ "$IS_ENTERPRISE" != "true" ]; then
echo ""
_warning "Note: Using Canton community instead of Canton enterprise. Certain tests which rely on Enterprise features will fail locally."
fi