Skip to content
Snippets Groups Projects
Commit b35a4ec2 authored by ale's avatar ale
Browse files

Add a test that the player page renders correctly

parent 401149e2
Branches
No related tags found
1 merge request!14Add an HTML audio player
Pipeline #11806 passed
......@@ -397,7 +397,7 @@ func staticCssPlayerCssBr() (*asset, error) {
return nil, err
}
 
info := bindataFileInfo{name: "static/css/player.css.br", size: 695, mode: os.FileMode(420), modTime: time.Unix(1612343832, 0)}
info := bindataFileInfo{name: "static/css/player.css.br", size: 695, mode: os.FileMode(420), modTime: time.Unix(1612345238, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}
......@@ -776,7 +776,7 @@ func staticJsPlayerJsBr() (*asset, error) {
return nil, err
}
 
info := bindataFileInfo{name: "static/js/player.js.br", size: 370, mode: os.FileMode(420), modTime: time.Unix(1612344201, 0)}
info := bindataFileInfo{name: "static/js/player.js.br", size: 370, mode: os.FileMode(420), modTime: time.Unix(1612345238, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}
......@@ -851,7 +851,7 @@ func staticSpeakerSvgBr() (*asset, error) {
return nil, err
}
 
info := bindataFileInfo{name: "static/speaker.svg.br", size: 278, mode: os.FileMode(420), modTime: time.Unix(1612341006, 0)}
info := bindataFileInfo{name: "static/speaker.svg.br", size: 278, mode: os.FileMode(420), modTime: time.Unix(1612345238, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}
......
......@@ -128,10 +128,21 @@ func TestNode_StatusPage(t *testing.T) {
resp, err := http.Get(httpSrv.URL)
if err != nil {
t.Fatalf("http.Get error: %v", err)
t.Fatalf("http.Get(/) error: %v", err)
}
defer resp.Body.Close()
resp.Body.Close()
if resp.StatusCode != 200 {
t.Fatalf("HTTP response: %s", resp.Status)
t.Fatalf("http.Get(/) error: HTTP: %s", resp.Status)
}
// Also check the player page.
resp, err = http.Get(httpSrv.URL + "/player/test.ogg")
if err != nil {
t.Fatalf("http.Get(/player/) error: %v", err)
}
resp.Body.Close()
if resp.StatusCode != 200 {
t.Fatalf("http.Get(/player/) error: HTTP: %s", resp.Status)
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment