mirror of
https://github.com/kairos-io/kairos-agent.git
synced 2025-06-03 01:44:53 +00:00
Fix RenderTemplate and a test
Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
This commit is contained in:
parent
b0b4618f8f
commit
9891916d49
@ -26,7 +26,7 @@ func RenderTemplate(path string, config *config.Config, runtime state.Runtime) (
|
||||
|
||||
result := new(bytes.Buffer)
|
||||
err = tpl.Execute(result, map[string]interface{}{
|
||||
"Config": config.Config,
|
||||
"Config": config.Config.Values,
|
||||
"State": runtimeMap,
|
||||
})
|
||||
if err != nil {
|
||||
|
@ -14,7 +14,9 @@ var _ = Describe("RenderTemplate action test", func() {
|
||||
It("renders the template with config and state", func() {
|
||||
config := agentConfig.NewConfig()
|
||||
config.Config = collector.Config{
|
||||
Values: collector.ConfigValues{
|
||||
"testKey": "testValue",
|
||||
},
|
||||
}
|
||||
runtime, err := state.NewRuntime()
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
|
Loading…
Reference in New Issue
Block a user