File tree Expand file tree Collapse file tree 1 file changed +78
-0
lines changed Expand file tree Collapse file tree 1 file changed +78
-0
lines changed Original file line number Diff line number Diff line change 1+ # !/usr/bin/perl
2+
3+ # (C) Aleksei Bavshin
4+ # (C) Nginx, Inc.
5+
6+ # Tests for ACME client: HTTP-01 challenge support.
7+
8+ # ##############################################################################
9+
10+ use warnings;
11+ use strict;
12+
13+ use Test::More;
14+
15+ use IO::Select;
16+
17+ BEGIN { use FindBin; chdir ($FindBin::Bin ); }
18+
19+ use lib ' lib' ;
20+ use Test::Nginx;
21+
22+ # ##############################################################################
23+
24+ select STDERR ; $| = 1;
25+ select STDOUT ; $| = 1;
26+
27+ my $t = Test::Nginx-> new()-> has(qw/ http socket_ssl/ )
28+ -> has_daemon(' openssl' )-> has_daemon(' pebble' );
29+
30+ $t -> write_file_expand(' nginx.conf' , <<'EOF' );
31+
32+ %%TEST_GLOBALS%%
33+
34+ daemon off;
35+
36+ events {
37+ }
38+
39+ http {
40+ %%TEST_GLOBALS_HTTP%%
41+
42+ server {
43+ listen 127.0.0.1:8080;
44+ server_name example.test;
45+ }
46+
47+ server {
48+ listen 127.0.0.1:8443 ssl;
49+ server_name example.test;
50+
51+ acme_certificate example.test
52+ issuer=default;
53+
54+ ssl_certificate $acme_certificate;
55+ ssl_certificate_key $acme_certificate_key;
56+ }
57+
58+ acme_issuer default {
59+ uri https://localhost:%%PORT_9000%%/dir;
60+
61+ 62+
63+ resolver 127.0.0.1:%%PORT_8980_UDP%%;
64+ resolver_timeout 5s;
65+
66+ state_path %%TESTDIR%%;
67+ }
68+ }
69+
70+ EOF
71+
72+ $t -> plan(1)-> run();
73+
74+ # ##############################################################################
75+
76+ pass(' no tests yet' );
77+
78+ # ##############################################################################
You can’t perform that action at this time.
0 commit comments