Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e1f6155322 | ||
|
|
c5f318033d |
No files matched your search
@@ -36,7 +36,7 @@ func TestUnsupportedSourceFormatAnswers415(t *testing.T) {
|
|||||||
h.handleImageError(encrypted, err)
|
h.handleImageError(encrypted, err)
|
||||||
|
|
||||||
for route, rec := range map[string]*httptest.ResponseRecorder{
|
for route, rec := range map[string]*httptest.ResponseRecorder{
|
||||||
"/v1/image/": plain, "/v1/e/": encrypted,
|
"HandleImage": plain, "HandleImageEnc": encrypted,
|
||||||
} {
|
} {
|
||||||
t.Logf("%s for %v: %d %s", route, err, rec.Code, rec.Body.String())
|
t.Logf("%s for %v: %d %s", route, err, rec.Code, rec.Body.String())
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
// TestImageProxyRefusesSVG requests an image the upstream answers as SVG,
|
// TestImageProxyRefusesSVG requests an image the upstream answers as SVG,
|
||||||
// at its own size and format and resized as PNG, through pixa's router,
|
// in its own format (orig) and resized as PNG, through pixa's router,
|
||||||
// upstream fetcher and image processor. pixa does not accept SVG as a
|
// upstream fetcher and image processor. pixa does not accept SVG as a
|
||||||
// source, so each request is answered 415, never with an image.
|
// source, so each request is answered 415, never with an image.
|
||||||
func TestImageProxyRefusesSVG(t *testing.T) {
|
func TestImageProxyRefusesSVG(t *testing.T) {
|
||||||
@@ -24,7 +24,7 @@ func TestImageProxyRefusesSVG(t *testing.T) {
|
|||||||
|
|
||||||
s, _, _ := startImageProxy(t, upstream)
|
s, _, _ := startImageProxy(t, upstream)
|
||||||
|
|
||||||
for _, sizeFormat := range []string{"orig.orig", "32x24.png"} {
|
for _, sizeFormat := range []string{"64x48.orig", "32x24.png"} {
|
||||||
target := "/v1/image/" + upstreamHost + "/drawing.svg/" + sizeFormat
|
target := "/v1/image/" + upstreamHost + "/drawing.svg/" + sizeFormat
|
||||||
|
|
||||||
rec := httptest.NewRecorder()
|
rec := httptest.NewRecorder()
|
||||||
|
|||||||
Reference in new issue
Block a user