Skip to content

Integration test declaration #167

@davidthor

Description

@davidthor

Description

Architect Components are able to be deployed with a single command, and include a lot of the metadata necessary to automatically connect to public and private services/endpoints. Because of this, developers should be able to declare integration tests that can be run as part of their application package. These integration tests could then be integrated into Architect's workflows to be run as part of preview environments or as part of blue/green and canary deployments.

Changes to Component schema

version: v2

deployments:
  main:
    image: my-image:latest

services:
  main:
    deployment: main
    port: 8080
    tests:
      first:
        image: my-image:latest
        environment:
          SVC_ADDR: ${{ services.main.url }}
        command: npm run integration-tests

ingresses:
  main:
    service: main
    tests:
      first:
        image: my-image:latest
        environment:
          INGRESS_ADDR: ${{ ingresses.main.url }}
        command: npm run integration-tests

Changes to graph generation

The first usage of this new feature will be in our deployment graphs. We should inject new task nodes that run for each test that depend on the service or interface. We should also ensure that anything consuming the service also depends on these new tests to be run. That would allow us to minimize the deploy footprint whenever tests fail.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions