Logo: Relish

  1. Sign in

Project: My-project

Initializing the platform root

This feature allows the platform admin initialize the platform
root, this is done when a new instance of the platform is being
created, it needs to be done before any operations are carried
out else the context will not not have a root object.

Scenarios
  • @relish_ready
Platform does not exist and a new one is created

This is the positive case where a platform root object can not be
found in the 'platform-ns' namespace.

Given
a :request_payload_to_create_platform is made for version "1" for "Initialize Platform"
And
'there is no other platform objects that exist in the application'
When
the request is received
Then
the :platform object is created and is returned as a hash via the response object
  • @relish_ready
The Platform appears to exist in the application

This is the negative case where a platform root object is found in the application namespace.
In this case the context stops running and throws an exception.

Given
a :request_payload_to_create_platform is made for version "1" for "Initialize Platform"
And
a :platform already exists in the application
When
the request is received
Then
a Context::Exception::RootExistsException is raised with the message "Root already exists" via the response object
  • @relish_ready
Request context given to the context is invalid

This is a negative case where a the request context that is passed
to the context is not valid (i.e. It is missing the target).
In this case, the context stops running and throws an exception

Given
an :incomplete_request_payload_to_create_platform is made for version "1" for "Initialize Platform"
When
the request is received
Then
a Context::Exception::MissingTargetException is raised with the message "These targets: [:platform] are required for Context::Platform::InitializePlatform" via the response object

Last published over 7 years ago by nbeagley.