Fast and extensible multi-platform HTTP/1-2-3 web server with automatic HTTPS
Mirrored from https://github.com/Slazee/caddy.git
Synced Nov 13, 06:45 UTC
caddytls: Add test cases for Caddyfile `tls` options (#5293)
Yannick Ihmels committed
Jan 9, 2023 at 21:18 UTC
66ce0c5c635c4ff254ccb92123711534b6461b35
4 files changed
+169
-3
caddytest/integration/caddyfile_adapt/tls_dns_ttl.txt
+9
-3
@@ -2,9 +2,7 @@ localhost
2
3
respond "hello from localhost"
4
tls {
5
- issuer acme {
6
- dns_ttl 5m10s
7
- }
5
+ dns_ttl 5m10s
6
}
7
----------
8
{
@@ -60,6 +58,14 @@ tls {
58
}
59
},
60
"module": "acme"
61
+ },
62
+ {
63
+ "challenges": {
64
+ "dns": {
65
+ "ttl": 310000000000
66
+ }
67
+ },
68
+ "module": "zerossl"
69
}
70
]
71
}
caddytest/integration/caddyfile_adapt/tls_explicit_issuer_dns_ttl.txt
new
+81
@@ -0,0 +1,81 @@
1
+localhost
2
+
3
+respond "hello from localhost"
4
+tls {
5
+ issuer acme {
6
+ dns_ttl 5m10s
7
+ }
8
+ issuer zerossl {
9
+ dns_ttl 10m20s
10
+ }
11
+}
12
+----------
13
+{
14
+ "apps": {
15
+ "http": {
16
+ "servers": {
17
+ "srv0": {
18
+ "listen": [
19
+ ":443"
20
+ ],
21
+ "routes": [
22
+ {
23
+ "match": [
24
+ {
25
+ "host": [
26
+ "localhost"
27
+ ]
28
+ }
29
+ ],
30
+ "handle": [
31
+ {
32
+ "handler": "subroute",
33
+ "routes": [
34
+ {
35
+ "handle": [
36
+ {
37
+ "body": "hello from localhost",
38
+ "handler": "static_response"
39
+ }
40
+ ]
41
+ }
42
+ ]
43
+ }
44
+ ],
45
+ "terminal": true
46
+ }
47
+ ]
48
+ }
49
+ }
50
+ },
51
+ "tls": {
52
+ "automation": {
53
+ "policies": [
54
+ {
55
+ "subjects": [
56
+ "localhost"
57
+ ],
58
+ "issuers": [
59
+ {
60
+ "challenges": {
61
+ "dns": {
62
+ "ttl": 310000000000
63
+ }
64
+ },
65
+ "module": "acme"
66
+ },
67
+ {
68
+ "challenges": {
69
+ "dns": {
70
+ "ttl": 620000000000
71
+ }
72
+ },
73
+ "module": "zerossl"
74
+ }
75
+ ]
76
+ }
77
+ ]
78
+ }
79
+ }
80
+ }
81
+}
\ No newline at end of file
caddytest/integration/caddyfile_adapt/tls_explicit_issuer_propagation_options.txt
renamed
caddytest/integration/caddyfile_adapt/tls_propagation_options.txt
new
+79
@@ -0,0 +1,79 @@
1
+localhost
2
+
3
+respond "hello from localhost"
4
+tls {
5
+ propagation_delay 5m10s
6
+ propagation_timeout 10m20s
7
+}
8
+----------
9
+{
10
+ "apps": {
11
+ "http": {
12
+ "servers": {
13
+ "srv0": {
14
+ "listen": [
15
+ ":443"
16
+ ],
17
+ "routes": [
18
+ {
19
+ "match": [
20
+ {
21
+ "host": [
22
+ "localhost"
23
+ ]
24
+ }
25
+ ],
26
+ "handle": [
27
+ {
28
+ "handler": "subroute",
29
+ "routes": [
30
+ {
31
+ "handle": [
32
+ {
33
+ "body": "hello from localhost",
34
+ "handler": "static_response"
35
+ }
36
+ ]
37
+ }
38
+ ]
39
+ }
40
+ ],
41
+ "terminal": true
42
+ }
43
+ ]
44
+ }
45
+ }
46
+ },
47
+ "tls": {
48
+ "automation": {
49
+ "policies": [
50
+ {
51
+ "subjects": [
52
+ "localhost"
53
+ ],
54
+ "issuers": [
55
+ {
56
+ "challenges": {
57
+ "dns": {
58
+ "propagation_delay": 310000000000,
59
+ "propagation_timeout": 620000000000
60
+ }
61
+ },
62
+ "module": "acme"
63
+ },
64
+ {
65
+ "challenges": {
66
+ "dns": {
67
+ "propagation_delay": 310000000000,
68
+ "propagation_timeout": 620000000000
69
+ }
70
+ },
71
+ "module": "zerossl"
72
+ }
73
+ ]
74
+ }
75
+ ]
76
+ }
77
+ }
78
+ }
79
+}
\ No newline at end of file