Fix for #3345: Add Content-Type Header "application/json" to GET /version and /info responses in remote API

Docker-DCO-1.0-Signed-off-by: Manuel Woelker <github@manuel.woelker.org> (github: manuel-woelker)
Upstream-commit: 53a01aebd61e8db34c9106f5b2c5fdad6909caee
Component: engine
This commit is contained in:
Manuel Woelker
2014-01-08 09:17:20 +01:00
parent 60f0fc80fb
commit 70ceedcf64
2 changed files with 10 additions and 0 deletions
@@ -49,6 +49,10 @@ func TestGetVersion(t *testing.T) {
if result := v.Get("Version"); result != expected {
t.Errorf("Expected version %s, %s found", expected, result)
}
expected = "application/json"
if result := r.HeaderMap.Get("Content-Type"); result != expected {
t.Errorf("Expected Content-Type %s, %s found", expected, result)
}
}
func TestGetInfo(t *testing.T) {
@@ -84,6 +88,10 @@ func TestGetInfo(t *testing.T) {
if images := i.GetInt("Images"); images != len(initialImages) {
t.Errorf("Expected images: %d, %d found", len(initialImages), images)
}
expected := "application/json"
if result := r.HeaderMap.Get("Content-Type"); result != expected {
t.Errorf("Expected Content-Type %s, %s found", expected, result)
}
}
func TestGetEvents(t *testing.T) {