Skip to content

Commit 04638ae

Browse files
committed
Add redirect tests
Signed-off-by: Kirtan Gajjar <[email protected]>
1 parent 169aa94 commit 04638ae

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

features/redirect.feature

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,24 @@ Feature: Site Redirection
1414
| HTTP/1.1 301 Moved Permanently |
1515
| Location: http://www.example1.test/ |
1616

17+
Scenario: no_www-ssl redirection works properly
18+
When I run 'sudo bin/ee site create example2.test --le [email protected] --skip-status-check'
19+
Then Request on 'localhost' with header 'Host: www.example2.test' should contain following headers:
20+
| header |
21+
| HTTP/1.1 301 Moved Permanently |
22+
| Location: https://example2.test/ |
23+
And Request on 'https://www.example2.test' with resolve option 'www.example2.test:443:127.0.0.1' should contain following headers:
24+
| header |
25+
| HTTP/1.1 301 Moved Permanently |
26+
| Location: https://example2.test/ |
27+
28+
Scenario: www-ssl redirection works properly
29+
When I run 'sudo bin/ee site create www.example3.test --le [email protected] --skip-status-check'
30+
Then Request on 'localhost' with header 'Host: example3.test' should contain following headers:
31+
| header |
32+
| HTTP/1.1 301 Moved Permanently |
33+
| Location: https://www.example3.test/ |
34+
And Request on 'https://example3.test/' with resolve option 'example3.test:443:127.0.0.1' should contain following headers:
35+
| header |
36+
| HTTP/1.1 301 Moved Permanently |
37+
| Location: https://www.example3.test/ |

0 commit comments

Comments
 (0)