1
0
mirror of https://github.com/imgproxy/imgproxy.git synced 2025-07-02 22:46:50 +02:00

More verbose path parsing errors

This commit is contained in:
DarthSim
2019-08-28 20:36:11 +06:00
parent 4409b08c24
commit 1cbc4eb973
3 changed files with 35 additions and 26 deletions

View File

@ -58,7 +58,7 @@ func (s *ProcessingOptionsTestSuite) TestParseBase64URLInvalid() {
_, err := parsePath(context.Background(), req)
require.Error(s.T(), err)
assert.Equal(s.T(), errInvalidImageURL.Error(), err.Error())
assert.Contains(s.T(), err.Error(), "Invalid image url")
}
func (s *ProcessingOptionsTestSuite) TestParsePlainURL() {
@ -121,7 +121,7 @@ func (s *ProcessingOptionsTestSuite) TestParsePlainURLInvalid() {
_, err := parsePath(context.Background(), req)
require.Error(s.T(), err)
assert.Equal(s.T(), errInvalidImageURL.Error(), err.Error())
assert.Contains(s.T(), err.Error(), "Invalid image url")
}
func (s *ProcessingOptionsTestSuite) TestParsePlainURLEscapedInvalid() {
@ -130,7 +130,7 @@ func (s *ProcessingOptionsTestSuite) TestParsePlainURLEscapedInvalid() {
_, err := parsePath(context.Background(), req)
require.Error(s.T(), err)
assert.Equal(s.T(), errInvalidImageURL.Error(), err.Error())
assert.Contains(s.T(), err.Error(), "Invalid image url")
}
func (s *ProcessingOptionsTestSuite) TestParsePathBasic() {