weldr: messages → msgs in status route
composer-cli expects `msgs`, not `messages`, and throws an exception if
it doesn't exist:
https://github.com/weldr/lorax/blob/master/src/composer/cli/status.py#L52
It is not used anywhere else, so this is a safe change.
This commit is contained in:
parent
7c0d384fde
commit
8e0dd790b7
2 changed files with 2 additions and 2 deletions
|
|
@ -286,7 +286,7 @@ func (api *API) statusHandler(writer http.ResponseWriter, request *http.Request,
|
|||
SchemaVersion string `json:"schema_version"`
|
||||
Backend string `json:"backend"`
|
||||
Build string `json:"build"`
|
||||
Messages []string `json:"messages"`
|
||||
Messages []string `json:"msgs"`
|
||||
}
|
||||
|
||||
err := json.NewEncoder(writer).Encode(reply{
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ func TestBasic(t *testing.T) {
|
|||
ExpectedStatus int
|
||||
ExpectedJSON string
|
||||
}{
|
||||
{"/api/status", http.StatusOK, `{"api":"1","db_supported":true,"db_version":"0","schema_version":"0","backend":"osbuild-composer","build":"devel","messages":[]}`},
|
||||
{"/api/status", http.StatusOK, `{"api":"1","db_supported":true,"db_version":"0","schema_version":"0","backend":"osbuild-composer","build":"devel","msgs":[]}`},
|
||||
|
||||
{"/api/v0/projects/source/list", http.StatusOK, `{"sources":["test-id"]}`},
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue