Class: ConfigurationService::Test::StubOrchestrationProvider
- Inherits:
-
OrchestrationProvider
- Object
- OrchestrationProvider
- ConfigurationService::Test::StubOrchestrationProvider
- Defined in:
- lib/configuration_service/test/stub_orchestration_provider.rb
Overview
Test orchestration provider for testing the Provider::Stub service provider
Registered to the OrchestrationProviderRegistry as “stub”.
Constant Summary
Constants inherited from OrchestrationProvider
OrchestrationProvider::ACTIVITY_ROLE_MAP, OrchestrationProvider::ROLES
Instance Method Summary collapse
-
#broken_service_provider ⇒ Object
A broken service provider.
-
#delete_configuration ⇒ Object
Delete configuration data.
-
#service_provider ⇒ Object
The service provider under test.
-
#service_provider_configuration ⇒ Object
The configuration for the service provider under test.
-
#service_provider_id ⇒ Object
The registered identifier of the service provider under test.
-
#token_for(role) ⇒ Object
Provide a token that authorizes a role.
Methods inherited from OrchestrationProvider
#authorize, #configuration_found_for_identifier?, #deauthorize, #existing_revision, #fail_next_request, #given_existing_configuration, #given_invalid_configuration, #given_metadata, #given_missing_configuration, #initialize, #pending, #publish_configuration, #request_configuration
Constructor Details
This class inherits a constructor from ConfigurationService::Test::OrchestrationProvider
Instance Method Details
#broken_service_provider ⇒ Object
A broken service provider
49 50 51 |
# File 'lib/configuration_service/test/stub_orchestration_provider.rb', line 49 def broken_service_provider ConfigurationService::Provider::Broken.new end |
#delete_configuration ⇒ Object
Delete configuration data
69 70 71 |
# File 'lib/configuration_service/test/stub_orchestration_provider.rb', line 69 def delete_configuration ConfigurationService::Provider::StubStore.instance.delete(@identifier) end |
#service_provider ⇒ Object
The service provider under test
40 41 42 |
# File 'lib/configuration_service/test/stub_orchestration_provider.rb', line 40 def service_provider ConfigurationService::Provider::Stub.new(service_provider_configuration) end |
#service_provider_configuration ⇒ Object
The configuration for the service provider under test
31 32 33 |
# File 'lib/configuration_service/test/stub_orchestration_provider.rb', line 31 def service_provider_configuration {name: "Stub configuration service provider"} end |
#service_provider_id ⇒ Object
The registered identifier of the service provider under test
22 23 24 |
# File 'lib/configuration_service/test/stub_orchestration_provider.rb', line 22 def service_provider_id "stub" end |
#token_for(role) ⇒ Object
Provide a token that authorizes a role
The token is taken from Provider::Stub::BUILTIN_TOKENS
60 61 62 |
# File 'lib/configuration_service/test/stub_orchestration_provider.rb', line 60 def token_for(role) ConfigurationService::Provider::Stub::BUILTIN_TOKENS[role] end |