Skip to content

Commit 5bc6592

Browse files
committed
split custom ttl into own file to not mess with other tests
1 parent e727484 commit 5bc6592

File tree

5 files changed

+42
-5
lines changed

5 files changed

+42
-5
lines changed

doc/spelling_word_list.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,4 @@ github
2020
vcl
2121
fos
2222
Vcl
23+
inline
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
include "../../../../resources/config/varnish-3/fos_debug.vcl";
2+
include "../../../../resources/config/varnish-3/fos_custom_ttl.vcl";
3+
4+
backend default {
5+
.host = "127.0.0.1";
6+
.port = "8080";
7+
}
8+
sub vcl_fetch {
9+
call fos_custom_ttl_fetch;
10+
}
11+
12+
sub vcl_deliver {
13+
call fos_debug_deliver;
14+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
vcl 4.0;
2+
3+
include "../../../../resources/config/varnish-4/fos_debug.vcl";
4+
include "../../../../resources/config/varnish-4/fos_custom_ttl.vcl";
5+
6+
backend default {
7+
.host = "127.0.0.1";
8+
.port = "8080";
9+
}
10+
11+
sub vcl_deliver {
12+
call fos_debug_deliver;
13+
}
14+
15+
sub vcl_fetch {
16+
call fos_custom_ttl_fetch;
17+
}

tests/Functional/Fixtures/varnish-4/fos.vcl

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ include "../../../../resources/config/varnish-4/fos_debug.vcl";
44
include "../../../../resources/config/varnish-4/fos_refresh.vcl";
55
include "../../../../resources/config/varnish-4/fos_purge.vcl";
66
include "../../../../resources/config/varnish-4/fos_ban.vcl";
7-
include "../../../../resources/config/varnish-4/fos_custom_ttl.vcl";
87

98
backend default {
109
.host = "127.0.0.1";
@@ -29,7 +28,3 @@ sub vcl_deliver {
2928
call fos_debug_deliver;
3029
call fos_ban_deliver;
3130
}
32-
33-
sub vcl_fetch {
34-
call fos_custom_ttl_fetch;
35-
}

tests/Functional/Varnish/CustomTtlTest.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,16 @@ public function setUp()
2727
parent::setUp();
2828
}
2929

30+
protected function getConfigFile()
31+
{
32+
switch ((int)$this->getVarnishVersion()) {
33+
case 4:
34+
return './tests/Functional/Fixtures/varnish-4/custom_ttl.vcl';
35+
default:
36+
return './tests/Functional/Fixtures/varnish-3/custom_ttl.vcl';
37+
}
38+
}
39+
3040
public function testCustomTtl()
3141
{
3242
$this->assertMiss($this->getResponse('/custom-ttl.php'));

0 commit comments

Comments
 (0)