initial
This commit is contained in:
25
test/config.yaml
Normal file
25
test/config.yaml
Normal file
@@ -0,0 +1,25 @@
|
||||
name: ${ENV:TEST_APP_NAME}
|
||||
host: ${EXEC:echo "test-host"}
|
||||
port: ${ENV:TEST_PORT}
|
||||
|
||||
server:
|
||||
hostname: ${EXEC:hostname}
|
||||
|
||||
machine:
|
||||
id: "${FILE:./test/machine-id}"
|
||||
cores: "${EXEC:echo 4}"
|
||||
|
||||
api:
|
||||
endpoint: "${JSON:./test/hosts.json:'.api_endpoints.primary'}"
|
||||
tls_host: "${JSON:./test/hosts.json:'.tls_sni_host[0]'}"
|
||||
|
||||
database:
|
||||
host: "${YAML:./test/data.yaml:'.database.host'}"
|
||||
version: "${YAML:./test/data.yaml:'.version'}"
|
||||
|
||||
nested:
|
||||
value: "${ENV:NESTED_${ENV:TEST_ENV_SUFFIX}}"
|
||||
|
||||
env:
|
||||
INJECTED_VAR: "injected-value"
|
||||
COMPUTED_VAR: "${EXEC:echo computed}"
|
||||
11
test/data.yaml
Normal file
11
test/data.yaml
Normal file
@@ -0,0 +1,11 @@
|
||||
database:
|
||||
host: db.example.com
|
||||
port: 5432
|
||||
credentials:
|
||||
username: dbuser
|
||||
password: secretpass
|
||||
features:
|
||||
- authentication
|
||||
- logging
|
||||
- metrics
|
||||
version: 2.0.0
|
||||
8
test/hosts.json
Normal file
8
test/hosts.json
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"tls_sni_host": ["example.com", "test.example.com"],
|
||||
"api_endpoints": {
|
||||
"primary": "https://api.example.com",
|
||||
"secondary": "https://api2.example.com"
|
||||
},
|
||||
"version": "1.2.3"
|
||||
}
|
||||
1
test/machine-id
Normal file
1
test/machine-id
Normal file
@@ -0,0 +1 @@
|
||||
test-machine-123456789
|
||||
Reference in New Issue
Block a user