mirror of
https://github.com/element-hq/ess-helm.git
synced 2026-11-26 03:46:41 -08:00
hostname substitution: try to substitue with actual test data
This commit is contained in:
1 file changed
+4
-2
@@ -12,6 +12,8 @@ import (
|
||||
|
||||
func TestRenderConfig(t *testing.T) {
|
||||
hostname, _ := os.Hostname()
|
||||
droppedFromHostname := hostname[2:4]
|
||||
|
||||
testCases := []struct {
|
||||
name string
|
||||
files []string
|
||||
@@ -25,12 +27,12 @@ func TestRenderConfig(t *testing.T) {
|
||||
env: map[string]string{
|
||||
"TEST_ENV": "value",
|
||||
"SECRET_KEY": "secret://testdata/secret_key",
|
||||
"THIS_HOSTNAME": "hostname://",
|
||||
"THIS_HOSTNAME": "hostname://" + droppedFromHostname,
|
||||
},
|
||||
expected: map[string]interface{}{
|
||||
"key": "value",
|
||||
"secretKey": "secret_value",
|
||||
"hostname": hostname,
|
||||
"hostname": hostname[0:2] + hostname[4:],
|
||||
},
|
||||
err: false,
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user