WIP: updated log level on some log entries and added environment variable expansion for command line and its arguments

This commit is contained in:
2025-05-26 17:17:20 +10:00
parent 2474d3cddf
commit 1827cf2e3e
14 changed files with 242 additions and 116 deletions
+14 -11
View File
@@ -112,17 +112,20 @@ func TestServiceTaskPatchEnv(t *testing.T) {
}
for _, tt := range tests {
t.Run(tt.name+" - service", func(t *testing.T) {
st := NewServiceTask(tt.name)
st.SetEnv(tt.serviceEnv...)
result := st.PatchEnv(tt.systemEnv)
assert.ElementsMatch(t, result, tt.expected)
})
t.Run(tt.name+" - cron", func(t *testing.T) {
st := NewCronTask(tt.name)
st.SetEnv(tt.serviceEnv...)
result := st.PatchEnv(tt.systemEnv)
assert.ElementsMatch(t, result, tt.expected)
t.Run(tt.name, func(t *testing.T) {
t.Run("service", func(t *testing.T) {
st := NewServiceTask(tt.name)
st.SetEnv(tt.serviceEnv...)
result := st.PatchEnv(tt.systemEnv)
assert.ElementsMatch(t, result, tt.expected)
})
t.Run("cron", func(t *testing.T) {
st := NewCronTask(tt.name)
st.SetEnv(tt.serviceEnv...)
result := st.PatchEnv(tt.systemEnv)
assert.ElementsMatch(t, result, tt.expected)
})
})
}
}