"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "wfe2/wfe_test.go" between
boulder-release-2020-06-23.tar.gz and boulder-release-2020-06-29.tar.gz

About: Boulder is an ACME-based Certificate Authority (CA) used by Let’s Encrypt (written in Go).

wfe_test.go  (boulder-release-2020-06-23):wfe_test.go  (boulder-release-2020-06-29)
skipping to change at line 908 skipping to change at line 908
for _, tc := range testCases { for _, tc := range testCases {
t.Run(tc.name, func(t *testing.T) { t.Run(tc.name, func(t *testing.T) {
responseWriter := httptest.NewRecorder() responseWriter := httptest.NewRecorder()
mux.ServeHTTP(responseWriter, tc.request) mux.ServeHTTP(responseWriter, tc.request)
// The response should have the expected HTTP status code // The response should have the expected HTTP status code
test.AssertEquals(t, responseWriter.Code, tc.expectedStat us) test.AssertEquals(t, responseWriter.Code, tc.expectedStat us)
// And the response should contain a valid nonce in the R eplay-Nonce header // And the response should contain a valid nonce in the R eplay-Nonce header
nonce := responseWriter.Header().Get("Replay-Nonce") nonce := responseWriter.Header().Get("Replay-Nonce")
test.AssertEquals(t, wfe.nonceService.Valid(nonce), true) test.AssertEquals(t, wfe.nonceService.Valid(nonce), true)
// The server MUST include a Cache-Control header field w
ith the "no-store"
// directive in responses for the newNonce resource, in o
rder to prevent
// caching of this resource.
cacheControl := responseWriter.Header().Get("Cache-Contro
l")
test.AssertEquals(t, cacheControl, "no-store")
}) })
} }
} }
func TestHTTPMethods(t *testing.T) { func TestHTTPMethods(t *testing.T) {
wfe, _ := setupWFE(t) wfe, _ := setupWFE(t)
mux := wfe.Handler(metrics.NoopRegisterer) mux := wfe.Handler(metrics.NoopRegisterer)
// NOTE: Boulder's muxer treats HEAD as implicitly allowed if GET is spec ified // NOTE: Boulder's muxer treats HEAD as implicitly allowed if GET is spec ified
// so we include both here in `getOnly` // so we include both here in `getOnly`
 End of changes. 1 change blocks. 
0 lines changed or deleted 8 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)