Skip to content

Commit 5a638a7

Browse files
committed
PB-37351: fixed mounts in tests
1 parent 6ad8042 commit 5a638a7

File tree

2 files changed

+17
-12
lines changed

2 files changed

+17
-12
lines changed

spec/docker_runtime_no_envs/runtime_no_envs_spec.rb

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,14 @@
4141
'Env' => [
4242
"DATASOURCES_DEFAULT_HOST=#{@mysql.json['NetworkSettings']['IPAddress']}"
4343
],
44-
'Binds' => $binds.append(
45-
"#{FIXTURES_PATH + '/passbolt.php'}:#{PASSBOLT_CONFIG_PATH + '/passbolt.php'}",
46-
"#{FIXTURES_PATH + '/public-test.key'}:#{PASSBOLT_CONFIG_PATH + 'gpg/unsecure.key'}",
47-
"#{FIXTURES_PATH + '/private-test.key'}:#{PASSBOLT_CONFIG_PATH + 'gpg/unsecure_private.key'}"
48-
),
44+
'HostConfig' => {
45+
'Binds' => $binds.append(
46+
"#{FIXTURES_PATH + '/passbolt.php'}:#{PASSBOLT_CONFIG_PATH + '/passbolt.php'}",
47+
"#{FIXTURES_PATH + '/public-test.key'}:#{PASSBOLT_CONFIG_PATH + 'gpg/unsecure.key'}",
48+
"#{FIXTURES_PATH + '/private-test.key'}:#{PASSBOLT_CONFIG_PATH + 'gpg/unsecure_private.key'}"
49+
)
50+
},
51+
4952
'Image' => @image.id
5053
)
5154

@@ -61,9 +64,7 @@
6164
@container.kill
6265
end
6366

64-
let(:passbolt_host) { @container.json['NetworkSettings']['IPAddress'] }
65-
let(:uri) { '/install' }
66-
let(:curl) { "curl -skL -H 'Host: passbolt.local' https://#{passbolt_host}:#{$https_port}/#{uri}" }
67+
let(:passbolt_host) { @container.json['NetworkSettings']['IPAddress'] }
6768

6869
describe 'php service' do
6970
it 'is running supervised' do
@@ -91,9 +92,11 @@
9192
end
9293
end
9394

94-
describe 'passbolt install' do
95+
describe 'passbolt healthcheck' do
96+
let(:uri) { '/healthcheck/status.json' }
97+
let(:curl) { "curl -sk -o /dev/null -w '%{http_code}' -H 'Host: passbolt.local' https://#{passbolt_host}:#{$https_port}/#{uri}" }
9598
it 'shows correctly' do
96-
expect(command(curl).stdout).to match(/.*Passbolt is not configured yet!.*/)
99+
expect(command(curl).stdout).to eq '200'
97100
end
98101
end
99102

spec/docker_runtime_with_passbolt_php/docker_runtime_with_passbolt_php_spec.rb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,13 @@
5858
'PASSBOLT_HEALTHCHECK_ERROR=true'
5959
],
6060
'Image' => @image.id,
61-
'Binds' => $binds.append(
61+
'HostConfig' => {
62+
'Binds' => $binds.append(
6263
"#{FIXTURES_PATH + '/passbolt-no-fingerprint.php'}:#{PASSBOLT_CONFIG_PATH + '/passbolt.php'}",
6364
"#{FIXTURES_PATH + '/public-test.key'}:#{PASSBOLT_CONFIG_PATH + 'gpg/unsecure.key'}",
6465
"#{FIXTURES_PATH + '/private-test.key'}:#{PASSBOLT_CONFIG_PATH + 'gpg/unsecure_private.key'}"
65-
)
66+
)
67+
},
6668
)
6769

6870
@container.start

0 commit comments

Comments
 (0)