]> git.openstreetmap.org Git - chef.git/blob - test/integration/planet/inspec/apache_spec.rb
nominatim: install secondary importance file
[chef.git] / test / integration / planet / inspec / apache_spec.rb
1 describe package("apache2") do
2   it { should be_installed }
3 end
4
5 describe service("apache2") do
6   it { should be_enabled }
7   it { should be_running }
8 end
9
10 describe port(80) do
11   it { should be_listening }
12   its("protocols") { should cmp "tcp" }
13 end
14
15 describe port(443) do
16   it { should be_listening }
17   its("protocols") { should cmp "tcp" }
18 end
19
20 describe http("http://localhost") do
21   its("status") { should cmp 200 }
22 end
23
24 # Minutely Replication Diffs
25
26 describe http("https://127.0.0.1/replication/minute/state.txt",
27               :headers => { "Host" => "planet.openstreetmap.org" },
28               :ssl_verify => false) do
29   its("status") { should eq 302 }
30   its("headers.Location") { should eq "https://osm-planet-eu-central-1.s3.dualstack.eu-central-1.amazonaws.com/planet/replication/minute/state.txt" }
31 end
32
33 describe http("https://127.0.0.1/replication/changesets/001/002/003.state.txt",
34               :headers => { "Host" => "planet.openstreetmap.org" },
35               :ssl_verify => false) do
36   its("status") { should eq 302 }
37   its("headers.Location") { should eq "https://osm-planet-eu-central-1.s3.dualstack.eu-central-1.amazonaws.com/changesets/replication/minute/001/002/003.state.txt" }
38 end
39
40 describe http("https://127.0.0.1/replication/minute/001/002/003.osc.gz",
41               :headers => { "Host" => "planet.openstreetmap.org" },
42               :ssl_verify => false) do
43   its("status") { should eq 302 }
44   its("headers.Location") { should eq "https://osm-planet-eu-central-1.s3.dualstack.eu-central-1.amazonaws.com/planet/replication/minute/001/002/003.osc.gz" }
45 end
46
47 # Hourly Replication Diffs
48
49 describe http("https://127.0.0.1/replication/hour/state.txt",
50               :headers => { "Host" => "planet.openstreetmap.org" },
51               :ssl_verify => false) do
52   its("status") { should eq 302 }
53   its("headers.Location") { should eq "https://osm-planet-eu-central-1.s3.dualstack.eu-central-1.amazonaws.com/planet/replication/hour/state.txt" }
54 end
55
56 describe http("https://127.0.0.1/replication/hour/001/002/003.state.txt",
57               :headers => { "Host" => "planet.openstreetmap.org" },
58               :ssl_verify => false) do
59   its("status") { should eq 302 }
60   its("headers.Location") { should eq "https://osm-planet-eu-central-1.s3.dualstack.eu-central-1.amazonaws.com/planet/replication/hour/001/002/003.state.txt" }
61 end
62
63 describe http("https://127.0.0.1/replication/minute/001/002/003.osc.gz",
64               :headers => { "Host" => "planet.openstreetmap.org" },
65               :ssl_verify => false) do
66   its("status") { should eq 302 }
67   its("headers.Location") { should eq "https://osm-planet-eu-central-1.s3.dualstack.eu-central-1.amazonaws.com/planet/replication/minute/001/002/003.osc.gz" }
68 end
69
70 # Daily Replication Diffs
71
72 describe http("https://127.0.0.1/replication/day/state.txt",
73               :headers => { "Host" => "planet.openstreetmap.org" },
74               :ssl_verify => false) do
75   its("status") { should eq 302 }
76   its("headers.Location") { should eq "https://osm-planet-eu-central-1.s3.dualstack.eu-central-1.amazonaws.com/planet/replication/day/state.txt" }
77 end
78
79 describe http("https://127.0.0.1/replication/day/001/002/003.state.txt",
80               :headers => { "Host" => "planet.openstreetmap.org" },
81               :ssl_verify => false) do
82   its("status") { should eq 302 }
83   its("headers.Location") { should eq "https://osm-planet-eu-central-1.s3.dualstack.eu-central-1.amazonaws.com/planet/replication/day/001/002/003.state.txt" }
84 end
85
86 describe http("https://127.0.0.1/replication/day/001/002/003.osc.gz",
87               :headers => { "Host" => "planet.openstreetmap.org" },
88               :ssl_verify => false) do
89   its("status") { should eq 302 }
90   its("headers.Location") { should eq "https://osm-planet-eu-central-1.s3.dualstack.eu-central-1.amazonaws.com/planet/replication/day/001/002/003.osc.gz" }
91 end
92
93 # Changeset Replication Diffs
94
95 describe http("https://127.0.0.1/replication/changesets/state.yaml",
96               :headers => { "Host" => "planet.openstreetmap.org" },
97               :ssl_verify => false) do
98   its("status") { should eq 302 }
99   its("headers.Location") { should eq "https://osm-planet-eu-central-1.s3.dualstack.eu-central-1.amazonaws.com/changesets/replication/minute/state.yaml" }
100 end
101
102 describe http("https://127.0.0.1/replication/changesets/001/002/003.state.txt",
103               :headers => { "Host" => "planet.openstreetmap.org" },
104               :ssl_verify => false) do
105   its("status") { should eq 302 }
106   its("headers.Location") { should eq "https://osm-planet-eu-central-1.s3.dualstack.eu-central-1.amazonaws.com/changesets/replication/minute/001/002/003.state.txt" }
107 end
108
109 describe http("https://127.0.0.1/replication/changesets/001/002/003.osm.gz",
110               :headers => { "Host" => "planet.openstreetmap.org" },
111               :ssl_verify => false) do
112   its("status") { should eq 302 }
113   its("headers.Location") { should eq "https://osm-planet-eu-central-1.s3.dualstack.eu-central-1.amazonaws.com/changesets/replication/minute/001/002/003.osm.gz" }
114 end
115
116 # Planet File
117
118 describe http("https://127.0.0.1/planet/2023/planet-231016.osm.bz2",
119               :headers => { "Host" => "planet.openstreetmap.org" },
120               :ssl_verify => false) do
121   its("status") { should eq 302 }
122   its("headers.Location") { should eq "https://osm-planet-eu-central-1.s3.dualstack.eu-central-1.amazonaws.com/planet/osm/2023/planet-231016.osm.bz2" }
123 end
124
125 # Planet File MD5
126
127 describe http("https://127.0.0.1/planet/2023/planet-231016.osm.bz2.md5",
128               :headers => { "Host" => "planet.openstreetmap.org" },
129               :ssl_verify => false) do
130   its("status") { should eq 302 }
131   its("headers.Location") { should eq "https://osm-planet-eu-central-1.s3.dualstack.eu-central-1.amazonaws.com/planet/osm/2023/planet-231016.osm.bz2.md5" }
132 end
133
134 # Full History Planet File
135
136 describe http("https://127.0.0.1/planet/full-history/2023/history-231016.osm.bz2",
137               :headers => { "Host" => "planet.openstreetmap.org" },
138               :ssl_verify => false) do
139   its("status") { should eq 302 }
140   its("headers.Location") { should eq "https://osm-planet-eu-central-1.s3.dualstack.eu-central-1.amazonaws.com/planet-full-history/osm/2023/history-231016.osm.bz2" }
141 end
142
143 # Full History Planet File MD5
144
145 describe http("https://127.0.0.1/planet/full-history/2023/history-231016.osm.bz2.md5",
146               :headers => { "Host" => "planet.openstreetmap.org" },
147               :ssl_verify => false) do
148   its("status") { should eq 302 }
149   its("headers.Location") { should eq "https://osm-planet-eu-central-1.s3.dualstack.eu-central-1.amazonaws.com/planet-full-history/osm/2023/history-231016.osm.bz2.md5" }
150 end
151
152 # PBF planet file
153
154 describe http("https://127.0.0.1/pbf/planet-231016.osm.pbf",
155               :headers => { "Host" => "planet.openstreetmap.org" },
156               :ssl_verify => false) do
157   its("status") { should eq 302 }
158   its("headers.Location") { should eq "https://osm-planet-eu-central-1.s3.dualstack.eu-central-1.amazonaws.com/planet/pbf/2023/planet-231016.osm.pbf" }
159 end
160
161 # PBF full history planet file
162
163 describe http("https://127.0.0.1/pbf/full-history/history-231016.osm.pbf",
164               :headers => { "Host" => "planet.openstreetmap.org" },
165               :ssl_verify => false) do
166   its("status") { should eq 302 }
167   its("headers.Location") { should eq "https://osm-planet-eu-central-1.s3.dualstack.eu-central-1.amazonaws.com/planet-full-history/pbf/2023/history-231016.osm.pbf" }
168 end
169
170 # Notes file
171
172 describe http("https://127.0.0.1/notes/2023/planet-notes-231222.osn.bz2",
173               :headers => { "Host" => "planet.openstreetmap.org" },
174               :ssl_verify => false) do
175   its("status") { should eq 302 }
176   its("headers.Location") { should eq "https://osm-planet-eu-central-1.s3.dualstack.eu-central-1.amazonaws.com/notes/osn/2023/planet-notes-231222.osn.bz2" }
177 end
178
179 describe http("https://127.0.0.1/notes/2023/planet-notes-231222.osn.bz2.md5",
180               :headers => { "Host" => "planet.openstreetmap.org" },
181               :ssl_verify => false) do
182   its("status") { should eq 302 }
183   its("headers.Location") { should eq "https://osm-planet-eu-central-1.s3.dualstack.eu-central-1.amazonaws.com/notes/osn/2023/planet-notes-231222.osn.bz2.md5" }
184 end
185
186 # Tiles log
187
188 describe http("https://127.0.0.1/tile_logs/tiles-2023-10-21.txt.xz",
189               :headers => { "Host" => "planet.openstreetmap.org" },
190               :ssl_verify => false) do
191   its("status") { should eq 302 }
192   its("headers.Location") { should eq "https://osm-planet-eu-central-1.s3.dualstack.eu-central-1.amazonaws.com/tile_logs/standard_layer/tiles/2023/tiles-2023-10-21.txt.xz" }
193 end