mirror of
				https://github.com/datarhei/core.git
				synced 2025-11-01 03:42:51 +08:00 
			
		
		
		
	Fix tests and marshalling process config
This commit is contained in:
		| @@ -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)) | ||||||
|   | |||||||
| @@ -29,4 +29,4 @@ | |||||||
| 	"reconnect": true, | 	"reconnect": true, | ||||||
| 	"reconnect_delay_seconds": 10, | 	"reconnect_delay_seconds": 10, | ||||||
| 	"stale_timeout_seconds": 10 | 	"stale_timeout_seconds": 10 | ||||||
| } | } | ||||||
| @@ -28,4 +28,4 @@ | |||||||
| 	"reconnect": true, | 	"reconnect": true, | ||||||
| 	"reconnect_delay_seconds": 10, | 	"reconnect_delay_seconds": 10, | ||||||
| 	"stale_timeout_seconds": 10 | 	"stale_timeout_seconds": 10 | ||||||
| } | } | ||||||
| @@ -29,4 +29,4 @@ | |||||||
| 	"reconnect": true, | 	"reconnect": true, | ||||||
| 	"reconnect_delay_seconds": 10, | 	"reconnect_delay_seconds": 10, | ||||||
| 	"stale_timeout_seconds": 10 | 	"stale_timeout_seconds": 10 | ||||||
| } | } | ||||||
| @@ -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 | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Ingo Oppermann
					Ingo Oppermann