|
35 | 35 | 'http://localhost/php-test.php?test=sha1', |
36 | 36 | 'https://localhost/php-test.php?test=sha1' |
37 | 37 | ].each do |url| |
38 | | - describe command("curl --insecure --silent --retry 10 --fail #{url}") do |
39 | | - it "should have running and answering webserver and php app server", :retry => 5, :retry_wait => 10 do |
40 | | - its(:stdout) { should_not contain('PHP Notice') } |
41 | | - its(:stdout) { should_not contain('Notice') } |
42 | | - its(:stdout) { should_not contain('PHP Warning') } |
43 | | - its(:stderr) { should_not contain('PHP Notice') } |
44 | | - its(:stderr) { should_not contain('Notice') } |
45 | | - its(:stderr) { should_not contain('PHP Warning') } |
46 | | - |
47 | | - its(:stdout) { should contain('2ae62521966cf6d4188acefc943c903e5fc0a25c') } |
48 | | - |
49 | | - its(:exit_status) { should eq 0 } |
| 38 | + describe url do |
| 39 | + it "should have running and answering webserver", :retry => 5, :retry_wait => 10 do |
| 40 | + cmd = command("curl --insecure --silent --retry 10 --fail #{url}") |
| 41 | + expect(cmd.stdout).not_to contain('PHP Notice') |
| 42 | + expect(cmd.stdout).not_to contain('Notice') |
| 43 | + expect(cmd.stdout).not_to contain('PHP Warning') |
| 44 | + expect(cmd.stdout).not_to contain('Warning') |
| 45 | + expect(cmd.stdout).not_to contain('Fatal Error') |
| 46 | + expect(cmd.stdout).to contain('2ae62521966cf6d4188acefc943c903e5fc0a25c') |
| 47 | + expect(cmd.exit_status).to eq 0 |
50 | 48 | end |
51 | 49 | end |
52 | 50 | end |
|
57 | 55 | 'http://localhost/php-test.php?test=php_sapi_name', |
58 | 56 | 'https://localhost/php-test.php?test=php_sapi_name' |
59 | 57 | ].each do |url| |
60 | | - describe command("curl --insecure --silent --retry 10 --fail #{url}") do |
61 | | - it "should have running and answering webserver and php app server", :retry => 5, :retry_wait => 10 do |
62 | | - its(:stdout) { should_not contain('PHP Notice') } |
63 | | - its(:stdout) { should_not contain('Notice') } |
64 | | - its(:stdout) { should_not contain('PHP Warning') } |
65 | | - its(:stderr) { should_not contain('PHP Notice') } |
66 | | - its(:stderr) { should_not contain('Notice') } |
67 | | - its(:stderr) { should_not contain('PHP Warning') } |
68 | | - |
69 | | - its(:stdout) { should contain('fpm-fcgi') } |
70 | | - |
71 | | - its(:exit_status) { should eq 0 } |
| 58 | + describe url do |
| 59 | + it "should have running and answering webserver", :retry => 5, :retry_wait => 10 do |
| 60 | + cmd = command("curl --insecure --silent --retry 10 --fail #{url}") |
| 61 | + expect(cmd.stdout).not_to contain('PHP Notice') |
| 62 | + expect(cmd.stdout).not_to contain('Notice') |
| 63 | + expect(cmd.stdout).not_to contain('PHP Warning') |
| 64 | + expect(cmd.stdout).not_to contain('Warning') |
| 65 | + expect(cmd.stdout).not_to contain('Fatal Error') |
| 66 | + expect(cmd.stdout).to contain('fpm-fcgi') |
| 67 | + expect(cmd.exit_status).to eq 0 |
72 | 68 | end |
73 | 69 | end |
74 | 70 | end |
|
80 | 76 | 'http://localhost/php-test.php?test=php_ini_scanned_files', |
81 | 77 | 'https://localhost/php-test.php?test=php_ini_scanned_files' |
82 | 78 | ].each do |url| |
83 | | - describe command("curl --insecure --silent --retry 10 --fail #{url}") do |
84 | | - it "should have running and answering webserver and php app server", :retry => 5, :retry_wait => 10 do |
85 | | - its(:stdout) { should_not contain('PHP Notice') } |
86 | | - its(:stdout) { should_not contain('Notice') } |
87 | | - its(:stdout) { should_not contain('PHP Warning') } |
88 | | - its(:stderr) { should_not contain('PHP Notice') } |
89 | | - its(:stderr) { should_not contain('Notice') } |
90 | | - its(:stderr) { should_not contain('PHP Warning') } |
91 | | - its(:stdout) { should contain('-docker.ini') } |
92 | | - its(:stdout) { should contain('-webdevops.ini') } |
93 | | - |
94 | | - its(:exit_status) { should eq 0 } |
| 79 | + describe url do |
| 80 | + it "should have running and answering webserver", :retry => 5, :retry_wait => 10 do |
| 81 | + cmd = command("curl --insecure --silent --retry 10 --fail #{url}") |
| 82 | + expect(cmd.stdout).not_to contain('PHP Notice') |
| 83 | + expect(cmd.stdout).not_to contain('Notice') |
| 84 | + expect(cmd.stdout).not_to contain('PHP Warning') |
| 85 | + expect(cmd.stdout).not_to contain('Warning') |
| 86 | + expect(cmd.stdout).not_to contain('Fatal Error') |
| 87 | + expect(cmd.stdout).to contain('-docker.ini') |
| 88 | + expect(cmd.stdout).to contain('-webdevops.ini') |
| 89 | + expect(cmd.exit_status).to eq 0 |
95 | 90 | end |
96 | 91 | end |
97 | 92 | end |
|
102 | 97 | 'http://localhost/php-test.php?test=version', |
103 | 98 | 'https://localhost/php-test.php?test=version' |
104 | 99 | ].each do |url| |
105 | | - describe command("curl --insecure --silent --retry 10 --fail #{url}") do |
106 | | - it "should have running and answering webserver and php app server", :retry => 5, :retry_wait => 10 do |
107 | | - its(:stdout) { should_not contain('PHP Notice') } |
108 | | - its(:stdout) { should_not contain('Notice') } |
109 | | - its(:stdout) { should_not contain('PHP Warning') } |
110 | | - its(:stderr) { should_not contain('PHP Notice') } |
111 | | - its(:stderr) { should_not contain('Notice') } |
112 | | - its(:stderr) { should_not contain('PHP Warning') } |
113 | | - |
114 | | - its(:stdout) { should match %r!PHP 5\.[3-9]\.[0-9]{1,2}(-[^\(]*)?! } |
115 | | - |
116 | | - its(:exit_status) { should eq 0 } |
| 100 | + describe url do |
| 101 | + it "should have running and answering webserver", :retry => 5, :retry_wait => 10 do |
| 102 | + cmd = command("curl --insecure --silent --retry 10 --fail #{url}") |
| 103 | + expect(cmd.stdout).not_to contain('PHP Notice') |
| 104 | + expect(cmd.stdout).not_to contain('Notice') |
| 105 | + expect(cmd.stdout).not_to contain('PHP Warning') |
| 106 | + expect(cmd.stdout).not_to contain('Warning') |
| 107 | + expect(cmd.stdout).not_to contain('Fatal Error') |
| 108 | + expect(cmd.stdout).to match %r!PHP 5\.[3-9]\.[0-9]{1,2}(-[^\(]*)?! |
| 109 | + expect(cmd.exit_status).to eq 0 |
117 | 110 | end |
118 | 111 | end |
119 | 112 | end |
|
124 | 117 | 'http://localhost/php-test.php?test=version', |
125 | 118 | 'https://localhost/php-test.php?test=version' |
126 | 119 | ].each do |url| |
127 | | - describe command("curl --insecure --silent --retry 10 --fail #{url}") do |
128 | | - it "should have running and answering webserver and php app server", :retry => 5, :retry_wait => 10 do |
129 | | - its(:stdout) { should_not contain('PHP Notice') } |
130 | | - its(:stdout) { should_not contain('Notice') } |
131 | | - its(:stdout) { should_not contain('PHP Warning') } |
132 | | - its(:stderr) { should_not contain('PHP Notice') } |
133 | | - its(:stderr) { should_not contain('Notice') } |
134 | | - its(:stderr) { should_not contain('PHP Warning') } |
135 | | - |
136 | | - its(:stdout) { should match %r!PHP 7\.[0-9]\.[0-9]{1,2}(-[^\(]*)?! } |
137 | | - |
138 | | - its(:exit_status) { should eq 0 } |
| 120 | + describe url do |
| 121 | + it "should have running and answering webserver", :retry => 5, :retry_wait => 10 do |
| 122 | + cmd = command("curl --insecure --silent --retry 10 --fail #{url}") |
| 123 | + expect(cmd.stdout).not_to contain('PHP Notice') |
| 124 | + expect(cmd.stdout).not_to contain('Notice') |
| 125 | + expect(cmd.stdout).not_to contain('PHP Warning') |
| 126 | + expect(cmd.stdout).not_to contain('Warning') |
| 127 | + expect(cmd.stdout).not_to contain('Fatal Error') |
| 128 | + expect(cmd.stdout).to match %r!PHP 7\.[0-9]\.[0-9]{1,2}(-[^\(]*)?! |
| 129 | + expect(cmd.exit_status).to eq 0 |
139 | 130 | end |
140 | 131 | end |
141 | 132 | end |
|
146 | 137 | 'http://localhost/php-test.php?test=process_user_id', |
147 | 138 | 'https://localhost/php-test.php?test=process_user_id' |
148 | 139 | ].each do |url| |
149 | | - describe command("curl --insecure --silent --retry 10 --fail #{url}") do |
150 | | - it "should have running and answering webserver and php app server", :retry => 5, :retry_wait => 10 do |
151 | | - its(:stdout) { should_not contain('PHP Notice') } |
152 | | - its(:stdout) { should_not contain('Notice') } |
153 | | - its(:stdout) { should_not contain('PHP Warning') } |
154 | | - its(:stderr) { should_not contain('PHP Notice') } |
155 | | - its(:stderr) { should_not contain('Notice') } |
156 | | - its(:stderr) { should_not contain('PHP Warning') } |
157 | | - |
158 | | - its(:stdout) { should contain('UID:1000#') } |
159 | | - |
160 | | - its(:exit_status) { should eq 0 } |
| 140 | + describe url do |
| 141 | + it "should have running and answering webserver", :retry => 5, :retry_wait => 10 do |
| 142 | + cmd = command("curl --insecure --silent --retry 10 --fail #{url}") |
| 143 | + expect(cmd.stdout).not_to contain('PHP Notice') |
| 144 | + expect(cmd.stdout).not_to contain('Notice') |
| 145 | + expect(cmd.stdout).not_to contain('PHP Warning') |
| 146 | + expect(cmd.stdout).not_to contain('Warning') |
| 147 | + expect(cmd.stdout).not_to contain('Fatal Error') |
| 148 | + expect(cmd.stdout).to contain('UID:1000#') |
| 149 | + expect(cmd.exit_status).to eq 0 |
161 | 150 | end |
162 | 151 | end |
163 | 152 | end |
|
0 commit comments