(t *testing.T)
| 120 | } |
| 121 | |
| 122 | func TestSignerAlgorithm(t *testing.T) { |
| 123 | srv := CreateServer([]string{ |
| 124 | "-imagor-signer-type", "sha256", |
| 125 | }) |
| 126 | app := srv.App.(*imagor.Imagor) |
| 127 | assert.Equal(t, "WN6mgyl8pD4KTy5IDSBs0GcFPaV7-R970JLsd01pqAU=", app.Signer.Sign("bar")) |
| 128 | |
| 129 | srv = CreateServer([]string{ |
| 130 | "-imagor-signer-type", "sha512", |
| 131 | "-imagor-signer-truncate", "32", |
| 132 | }) |
| 133 | app = srv.App.(*imagor.Imagor) |
| 134 | assert.Equal(t, "Kmml5ejnmsn7M7TszYkeM2j5G3bpI7mp", app.Signer.Sign("bar")) |
| 135 | } |
| 136 | |
| 137 | func TestCacheHeaderNoCache(t *testing.T) { |
| 138 | srv := CreateServer([]string{"-imagor-cache-header-no-cache"}) |
nothing calls this directly
no test coverage detected