From de65339d35014c946bc48ddde90479d89c919b8b Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Fri, 1 May 2020 11:31:45 +0300 Subject: Change: tweak scenarios --- ewww.md | 21 ++++++++++++++++++--- ewww.yaml | 3 ++- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/ewww.md b/ewww.md index b1a9ad0..e00b4e5 100644 --- a/ewww.md +++ b/ewww.md @@ -100,7 +100,7 @@ then I get status code 404 when I create webroot/foo and I request GET http://example.com/.well-known/foo then I get status code 200 -and content-type is application/octet-stream +and content-type is "application/octet-stream" when I request HEAD http://example.com/.well-known/foo then I get status code 200 @@ -138,9 +138,24 @@ when I request files under https://example.com in random order 100000 times then I can do at least 100 requests per second ~~~ -# Unhappy scenarios +## Using POST, PUT, or DELETE fails -* not GET or HEAD +~~~scenario +given a self-signed certificate as snakeoil.pem, using key snakeoil.key +and a running server using config file smoke.yaml + +when I request POST https://example.com/ +then I get status code 405 +and allow is "GET HEAD" + +when I request PUT https://example.com/ +then I get status code 405 +and allow is "GET HEAD" + +when I request DELETE https://example.com/ +then I get status code 405 +and allow is "GET HEAD" +~~~ --- diff --git a/ewww.yaml b/ewww.yaml index a806380..aefcea6 100644 --- a/ewww.yaml +++ b/ewww.yaml @@ -16,7 +16,8 @@ - then: I get status code {code} function: fixme -- then: "{header} is {value}" +- then: '(?P
\S+) is "(?P.+)"' + regex: true function: fixme - when: I create {filename} -- cgit v1.2.1