Fix tests and marshalling process config

This commit is contained in:
Ingo Oppermann
2025-05-15 15:09:47 +02:00
parent cc0da080c6
commit fc97a6f069
5 changed files with 8 additions and 4 deletions

View File

@@ -309,6 +309,7 @@ func (cfg *ProcessConfig) Unmarshal(c *app.Config, metadata map[string]interface
io := ProcessConfigIO{ io := ProcessConfigIO{
ID: x.ID, ID: x.ID,
Address: x.Address, Address: x.Address,
Cleanup: []ProcessConfigIOCleanup{},
} }
io.Options = make([]string, len(x.Options)) io.Options = make([]string, len(x.Options))
@@ -321,6 +322,7 @@ func (cfg *ProcessConfig) Unmarshal(c *app.Config, metadata map[string]interface
io := ProcessConfigIO{ io := ProcessConfigIO{
ID: x.ID, ID: x.ID,
Address: x.Address, Address: x.Address,
Cleanup: []ProcessConfigIOCleanup{},
} }
io.Options = make([]string, len(x.Options)) io.Options = make([]string, len(x.Options))

View File

@@ -29,4 +29,4 @@
"reconnect": true, "reconnect": true,
"reconnect_delay_seconds": 10, "reconnect_delay_seconds": 10,
"stale_timeout_seconds": 10 "stale_timeout_seconds": 10
} }

View File

@@ -28,4 +28,4 @@
"reconnect": true, "reconnect": true,
"reconnect_delay_seconds": 10, "reconnect_delay_seconds": 10,
"stale_timeout_seconds": 10 "stale_timeout_seconds": 10
} }

View File

@@ -29,4 +29,4 @@
"reconnect": true, "reconnect": true,
"reconnect_delay_seconds": 10, "reconnect_delay_seconds": 10,
"stale_timeout_seconds": 10 "stale_timeout_seconds": 10
} }

View File

@@ -354,7 +354,9 @@ func (h *ProcessHandler) Update(c echo.Context) error {
h.restream.SetProcessMetadata(tid, key, data) h.restream.SetProcessMetadata(tid, key, data)
} }
return c.JSON(http.StatusOK, process) p, _ := h.getProcess(tid, newFilter("config"))
return c.JSON(http.StatusOK, p.Config)
} }
// Command issues a command to a process // Command issues a command to a process