Skip to content

Commit 2362e36

Browse files
committed
Fix tests after MC::Role update
1 parent 6fe4d73 commit 2362e36

File tree

7 files changed

+42
-21
lines changed

7 files changed

+42
-21
lines changed

t/server/controller/author.t

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,16 @@ my %tests = (
1919
cache_control => undef,
2020
surrogate_key =>
2121
'author=DOESNEXIST content_type=application/json content_type=application',
22-
surrogate_control => 'max-age=31556952, stale-if-error=2592000',
22+
surrogate_control =>
23+
'max-age=31556952, stale-while-revalidate=86400, stale-if-error=2592000',
2324
},
2425
'/author/MO' => {
2526
code => 200,
2627
cache_control => undef,
2728
surrogate_key =>
2829
'author=MO content_type=application/json content_type=application',
29-
surrogate_control => 'max-age=31556952, stale-if-error=2592000',
30+
surrogate_control =>
31+
'max-age=31556952, stale-while-revalidate=86400, stale-if-error=2592000',
3032
},
3133
'/author/_mapping' => {
3234
code => 200,

t/server/controller/changes.t

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,16 @@ my $LOCAL_default_headers = {
1010
cache_control => undef,
1111
surrogate_key =>
1212
'author=LOCAL content_type=application/json content_type=application',
13-
surrogate_control => 'max-age=31556952, stale-if-error=2592000',
13+
surrogate_control =>
14+
'max-age=31556952, stale-while-revalidate=86400, stale-if-error=2592000',
1415
};
1516

1617
my $RWSTAUNER_default_headers = {
1718
cache_control => undef,
1819
surrogate_key =>
1920
'author=RWSTAUNER content_type=application/json content_type=application',
20-
surrogate_control => 'max-age=31556952, stale-if-error=2592000',
21+
surrogate_control =>
22+
'max-age=31556952, stale-while-revalidate=86400, stale-if-error=2592000',
2123
};
2224

2325
my @tests = (
@@ -53,7 +55,8 @@ my @tests = (
5355
cache_control => undef,
5456
surrogate_key =>
5557
'author=NOEXISTY content_type=application/json content_type=application',
56-
surrogate_control => 'max-age=31556952, stale-if-error=2592000',
58+
surrogate_control =>
59+
'max-age=31556952, stale-while-revalidate=86400, stale-if-error=2592000',
5760
}
5861
],
5962
[
@@ -63,7 +66,8 @@ my @tests = (
6366
cache_control => undef,
6467
surrogate_key =>
6568
'author=NOAUTOR content_type=application/json content_type=application',
66-
surrogate_control => 'max-age=31556952, stale-if-error=2592000',
69+
surrogate_control =>
70+
'max-age=31556952, stale-while-revalidate=86400, stale-if-error=2592000',
6771
}
6872
],
6973

t/server/controller/diff.t

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,8 @@ test_psgi app, sub {
7272
cache_control => undef,
7373
surrogate_key =>
7474
'author=DOY content_type=application/json content_type=application',
75-
surrogate_control => 'max-age=31556952, stale-if-error=2592000',
75+
surrogate_control =>
76+
'max-age=31556952, stale-while-revalidate=86400, stale-if-error=2592000',
7677
}
7778
);
7879

@@ -95,7 +96,8 @@ test_psgi app, sub {
9596
cache_control => undef,
9697
surrogate_key =>
9798
'content_type=application/json content_type=application',
98-
surrogate_control => 'max-age=31556952, stale-if-error=2592000',
99+
surrogate_control =>
100+
'max-age=31556952, stale-while-revalidate=86400, stale-if-error=2592000',
99101
}
100102
);
101103

t/server/controller/file.t

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,16 @@ my %tests = (
3434
cache_control => undef,
3535
surrogate_key =>
3636
'author=DOES content_type=application/json content_type=application',
37-
surrogate_control => 'max-age=31556952, stale-if-error=2592000',
37+
surrogate_control =>
38+
'max-age=31556952, stale-while-revalidate=86400, stale-if-error=2592000',
3839
},
3940
'/file/DOY/Moose-0.01/lib/Moose.pm' => {
4041
code => 200,
4142
cache_control => undef,
4243
surrogate_key =>
4344
'author=DOY content_type=application/json content_type=application',
44-
surrogate_control => 'max-age=31556952, stale-if-error=2592000',
45+
surrogate_control =>
46+
'max-age=31556952, stale-while-revalidate=86400, stale-if-error=2592000',
4547
},
4648
);
4749

t/server/controller/module.t

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ my %tests = (
2121
cache_control => undef,
2222
surrogate_key =>
2323
'author=DOY content_type=application/json content_type=application',
24-
surrogate_control => 'max-age=31556952, stale-if-error=2592000',
24+
surrogate_control =>
25+
'max-age=31556952, stale-while-revalidate=86400, stale-if-error=2592000',
2526
},
2627
'/module/Moose' => {
2728
code => 200,
@@ -50,7 +51,8 @@ my %tests = (
5051
cache_control => undef,
5152
surrogate_key =>
5253
'author=DOES content_type=application/json content_type=application',
53-
surrogate_control => 'max-age=31556952, stale-if-error=2592000',
54+
surrogate_control =>
55+
'max-age=31556952, stale-while-revalidate=86400, stale-if-error=2592000',
5456
},
5557

5658
);

t/server/controller/pod.t

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ my @tests = (
3636
cache_control => undef,
3737
surrogate_key =>
3838
'author=DOY content_type=application/json content_type=application',
39-
surrogate_control => 'max-age=31556952, stale-if-error=2592000',
39+
surrogate_control =>
40+
'max-age=31556952, stale-while-revalidate=86400, stale-if-error=2592000',
4041
},
4142
},
4243
{
@@ -46,7 +47,8 @@ my @tests = (
4647
cache_control => undef,
4748
surrogate_key =>
4849
'author=DOY content_type=text/html content_type=text',
49-
surrogate_control => 'max-age=31556952, stale-if-error=2592000',
50+
surrogate_control =>
51+
'max-age=31556952, stale-while-revalidate=86400, stale-if-error=2592000',
5052
},
5153
},
5254
{
@@ -56,7 +58,8 @@ my @tests = (
5658
cache_control => undef,
5759
surrogate_key =>
5860
'author=DOY content_type=text/html content_type=text',
59-
surrogate_control => 'max-age=31556952, stale-if-error=2592000',
61+
surrogate_control =>
62+
'max-age=31556952, stale-while-revalidate=86400, stale-if-error=2592000',
6063
},
6164
},
6265
{
@@ -66,7 +69,8 @@ my @tests = (
6669
cache_control => undef,
6770
surrogate_key =>
6871
'author=MO content_type=text/html content_type=text',
69-
surrogate_control => 'max-age=31556952, stale-if-error=2592000',
72+
surrogate_control =>
73+
'max-age=31556952, stale-while-revalidate=86400, stale-if-error=2592000',
7074
},
7175
},
7276
);

t/server/controller/source.t

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,35 +20,40 @@ my %tests = (
2020
cache_control => undef,
2121
surrogate_key =>
2222
'author=DOY content_type=text/html content_type=text',
23-
surrogate_control => 'max-age=31556952, stale-if-error=2592000'
23+
surrogate_control =>
24+
'max-age=31556952, stale-while-revalidate=86400, stale-if-error=2592000'
2425
},
2526
'/source/DOY/Moose-0.01/Changes' => {
2627
code => 200,
2728
cache_control => undef,
2829
surrogate_key =>
2930
'author=DOY content_type=text/plain content_type=text',
30-
surrogate_control => 'max-age=31556952, stale-if-error=2592000',
31+
surrogate_control =>
32+
'max-age=31556952, stale-while-revalidate=86400, stale-if-error=2592000',
3133
},
3234
'/source/DOY/Moose-0.01/Changes?callback=foo' => {
3335
code => 200,
3436
cache_control => undef,
3537
surrogate_key =>
3638
'author=DOY content_type=text/javascript content_type=text',
37-
surrogate_control => 'max-age=31556952, stale-if-error=2592000',
39+
surrogate_control =>
40+
'max-age=31556952, stale-while-revalidate=86400, stale-if-error=2592000',
3841
},
3942
'/source/DOY/Moose-0.01/MANIFEST' => {
4043
code => 200,
4144
cache_control => undef,
4245
surrogate_key =>
4346
'author=DOY content_type=text/plain content_type=text',
44-
surrogate_control => 'max-age=31556952, stale-if-error=2592000',
47+
surrogate_control =>
48+
'max-age=31556952, stale-while-revalidate=86400, stale-if-error=2592000',
4549
},
4650
'/source/DOY/Moose-0.01/MANIFEST?callback=foo' => {
4751
code => 200,
4852
cache_control => undef,
4953
surrogate_key =>
5054
'author=DOY content_type=text/javascript content_type=text',
51-
surrogate_control => 'max-age=31556952, stale-if-error=2592000',
55+
surrogate_control =>
56+
'max-age=31556952, stale-while-revalidate=86400, stale-if-error=2592000',
5257
},
5358
'/source/Moose' => {
5459
code => 200,

0 commit comments

Comments
 (0)