add request signature support to Proxy

This commit is contained in:
Will Norris 2015-05-11 19:36:42 -07:00
parent 9d6f8fdf7d
commit a9efefc8e7
4 changed files with 105 additions and 23 deletions

View file

@ -29,12 +29,12 @@ func TestOptions_String(t *testing.T) {
"0x0",
},
{
Options{1, 2, true, 90, true, true, 80},
Options{1, 2, true, 90, true, true, 80, ""},
"1x2,fit,r90,fv,fh,q80",
},
{
Options{0.15, 1.3, false, 45, false, false, 95},
"0.15x1.3,r45,q95",
Options{0.15, 1.3, false, 45, false, false, 95, "c0ffee"},
"0.15x1.3,r45,q95,sc0ffee",
},
}
@ -82,8 +82,8 @@ func TestParseOptions(t *testing.T) {
{"FOO,1,BAR,r90,BAZ", Options{Width: 1, Height: 1, Rotate: 90}},
// all flags, in different orders
{"q70,1x2,fit,r90,fv,fh", Options{1, 2, true, 90, true, true, 70}},
{"r90,fh,q90,1x2,fv,fit", Options{1, 2, true, 90, true, true, 90}},
{"q70,1x2,fit,r90,fv,fh,sc0ffee", Options{1, 2, true, 90, true, true, 70, "c0ffee"}},
{"r90,fh,sc0ffee,q90,1x2,fv,fit", Options{1, 2, true, 90, true, true, 90, "c0ffee"}},
}
for _, tt := range tests {