This commit is contained in:
6543 2022-06-13 13:47:23 +02:00
parent 5a5a7274c2
commit 0c622d1eac
2 changed files with 6 additions and 5 deletions

View file

@ -16,7 +16,7 @@ import (
)
func TestGetRedirect(t *testing.T) {
log.Printf("== TestGetRedirect ==\n")
log.Printf("=== TestGetRedirect ===\n")
// test custom domain redirect
resp, err := getTestHTTPSClient().Get("https://calciumdibromid.localhost.mock.directory:4430")
assert.NoError(t, err)
@ -28,7 +28,7 @@ func TestGetRedirect(t *testing.T) {
}
func TestGetContent(t *testing.T) {
log.Printf("== TestGetContent ==\n")
log.Printf("=== TestGetContent ===\n")
// test get image
resp, err := getTestHTTPSClient().Get("https://magiclike.localhost.mock.directory:4430/images/827679288a.jpg")
assert.NoError(t, err)
@ -50,6 +50,7 @@ func TestGetContent(t *testing.T) {
}
func TestCustomDomain(t *testing.T) {
log.Printf("=== TestCustomDomain ===\n")
resp, err := getTestHTTPSClient().Get("https://mock-pages.codeberg-test.org:4430/README.md")
assert.NoError(t, err)
if !assert.EqualValues(t, http.StatusOK, resp.StatusCode) {
@ -60,7 +61,7 @@ func TestCustomDomain(t *testing.T) {
}
func TestGetNotFound(t *testing.T) {
log.Printf("== TestGetNotFound ==\n")
log.Printf("=== TestGetNotFound ===\n")
// test custom not found pages
resp, err := getTestHTTPSClient().Get("https://crystal.localhost.mock.directory:4430/pages-404-demo/blah")
assert.NoError(t, err)