mirror of
https://github.com/akvorado/akvorado.git
synced 2025-12-11 22:14:02 +01:00
orchestrator: allow to register several configuration for a given service
Use the first one by default and if the index is not known. Remove service registration as this is not used yet.
This commit is contained in:
@@ -24,6 +24,10 @@ func TestConfigurationEndpoint(t *testing.T) {
|
||||
"hello": "Hello world!",
|
||||
"bye": "Goodbye world!",
|
||||
})
|
||||
c.RegisterConfiguration(InletService, map[string]string{
|
||||
"hello": "Hello pal!",
|
||||
"bye": "Goodbye pal!",
|
||||
})
|
||||
|
||||
helpers.TestHTTPEndpoints(t, h.Address, helpers.HTTPEndpointCases{
|
||||
{
|
||||
@@ -33,6 +37,31 @@ func TestConfigurationEndpoint(t *testing.T) {
|
||||
`bye: Goodbye world!`,
|
||||
`hello: Hello world!`,
|
||||
},
|
||||
}, {
|
||||
URL: "/api/v0/orchestrator/configuration/inlet/0",
|
||||
ContentType: "application/x-yaml; charset=utf-8",
|
||||
FirstLines: []string{
|
||||
`bye: Goodbye world!`,
|
||||
`hello: Hello world!`,
|
||||
},
|
||||
}, {
|
||||
URL: "/api/v0/orchestrator/configuration/inlet/1",
|
||||
ContentType: "application/x-yaml; charset=utf-8",
|
||||
FirstLines: []string{
|
||||
`bye: Goodbye pal!`,
|
||||
`hello: Hello pal!`,
|
||||
},
|
||||
}, {
|
||||
URL: "/api/v0/orchestrator/configuration/inlet/2",
|
||||
ContentType: "application/x-yaml; charset=utf-8",
|
||||
FirstLines: []string{
|
||||
`bye: Goodbye world!`,
|
||||
`hello: Hello world!`,
|
||||
},
|
||||
}, {
|
||||
URL: "/api/v0/orchestrator/configuration/console/0",
|
||||
ContentType: "application/json; charset=utf-8",
|
||||
StatusCode: 404,
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user