Use service anchor to ensure API is up

... instead of the individual service resource which can be named
differently according to service_name.

Closes-Bug: #1949658
Change-Id: I6be21a4653d67c63a3bd1fa8b814ecdb1257f097
This commit is contained in:
Takashi Kajinami 2021-11-04 09:07:10 +09:00
parent 76c5e9b955
commit f44d3c4987
2 changed files with 3 additions and 3 deletions

View File

@ -366,6 +366,6 @@ as a standalone service, or httpd for being run by a httpd server")
}
}
$validation_options_hash = merge ($defaults, $validation_options)
create_resources('openstacklib::service_validation', $validation_options_hash, {'subscribe' => 'Service[nova-api]'})
create_resources('openstacklib::service_validation', $validation_options_hash, {'subscribe' => 'Anchor[nova::service::end]'})
}
}

View File

@ -143,7 +143,7 @@ describe 'nova::api' do
end
it { is_expected.to contain_openstacklib__service_validation('nova-api').with(
:command => 'nova --os-auth-url http://127.0.0.1:5000/ --os-project-name services --os-username novae --os-password passw0rd flavor-list',
:subscribe => 'Service[nova-api]',
:subscribe => 'Anchor[nova::service::end]',
)}
end
@ -157,7 +157,7 @@ describe 'nova::api' do
end
it { is_expected.to contain_openstacklib__service_validation('nova-api').with(
:command => 'my-script',
:subscribe => 'Service[nova-api]',
:subscribe => 'Anchor[nova::service::end]',
)}
end