Skip to main content
Version: 31.0.0

a9s Service Smoke Tests

For each a9s Data Service, there is an errand smoke-tests included.

This errand can be used to verify the main a9s Data Service features work in your environment.

It ensures:

  • Service instances can be created.
  • Service instances can be bound to CF applications.
  • Applications can use the data service (e.g. insert data into a9s PostgreSQL instance).
  • Service instances can be updated to a bigger plan (vertical scaling).
  • Data is still in the database after vertical scaling.
  • Data can be backed up and restored.

Important

The smoke-tests errand tries to remove the services and applications upon its completion, but the smoke-tests errand cannot guarantee that there are no leftovers. It is the platform operator's responsibility to monitor the smoke-tests CF org and remove leftovers. Leftovers might slow down the system and raise costs for the environment (for example an AWS).

Smoke Tests Properties

service-smoke-tests.cf.assign_space_developer_role

When set to true the SpaceDeveloper role is assigned to the configured Cloud Foundry user in the configured organization and space, otherwise it must be manually assigned.

The SpaceDeveloper role is necessary to execute the a9s Service Dashboard tests. See also: service-smoke-tests.service.do_check_dashboard_sso

Default value: true

NOTE: The role is not removed from the used Cloud Foundry user afterwards.

IMPORTANT: Please be aware that if this property is set to true, this potentially extends the permissions of the Cloud Foundry user being used.

service-smoke-tests.service.do_check_dashboard_sso

Enables or disables Dashboard Single Sign On (SSO) smoke tests, which checks that the configured user can log in with a single ID and password to gain access to a9s Service Dashboard. The default value is true.

Example Ops file to disable the Dashboard SSO smoke tests:

---
- type: replace
path: /properties/service-smoke-tests/service/do_check_dashboard_sso?
value: false

service-smoke-tests.service.do_check_prometheus_streaming

Enables or disables Prometheus platform metrics streaming tests. These tests checks if the metrics of a service instance could be streamed to the Prometheus instance deployed by the platform operator. That this platform operator Prometheus is available, the opterator needs to deploy the Prometheus service broker and an instance with the prometheus-platform-logging plan. This instance will create the consul DNS entries needed for the metrics streaming tests.

To disable these tests, you can use the opsfile "without-prometheus-platform-tests.yml" by deploying your service. This will disable the metrics streaming tests.

service-smoke-tests.service.do_check_migration

If enabled, the smoke tests will run migration tests. It is basically testing the custom parameter copy_from that is available to the application developer, see Migration documentation.

For every service that you want to run migration tests, you must set the plan_migrations property. For example:

    properties:
service-smoke-tests:
service:
do_check_migration: true
services:
- name: a9s-postgresql13
plan_migrations:
- origin_service: a9s-postgresql94
origin_plan: postgresql-single-nano
target_plan: postgresql-single-nano

The property plan_migrations can be null to not test anything for the current service.

Otherwise, it must be an array of objects with the following keys:

  • origin_service: The service name where the origin_plan exists.
  • origin_plan: The plan name for the instance we do want to fill with data and migrate data from.
  • target_plan: The plan name within the current service we create an instance with and do want to migrate data to.

For every entry in the array the test will run the following high level test logic:

  • Spawn up an instance with service origin_service and plan origin_plan and fill it with data.
  • Spawn up a new instance with current service and plan target_plan using the custom param copy_from.
  • Validate new instance copied the data from the first instance.

Caveats

The service names you reference must exist under properties.service-smoke-tests.service.services, otherwise the smoke tests might fail during migration tests since the service offering must be enabled during smoke tests initialization.