summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2020-05-01 11:31:45 +0300
committerLars Wirzenius <liw@liw.fi>2020-05-01 11:31:45 +0300
commitde65339d35014c946bc48ddde90479d89c919b8b (patch)
treeac7886ce877a9b734d6a8e1bf744aee1b2909bd7
parentaf7e3b55b0e608691328d04dc34cb97b08e7bff1 (diff)
downloadewww-de65339d35014c946bc48ddde90479d89c919b8b.tar.gz
Change: tweak scenarios
-rw-r--r--ewww.md21
-rw-r--r--ewww.yaml3
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<header>\S+) is "(?P<value>.+)"'
+ regex: true
function: fixme
- when: I create {filename}