Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integration test declaration #167

Open
davidthor opened this issue Aug 8, 2023 · 0 comments
Open

Integration test declaration #167

davidthor opened this issue Aug 8, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@davidthor
Copy link
Member

davidthor commented Aug 8, 2023

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.

@davidthor davidthor added this to the v0.2 - Lifecycle hooks milestone Aug 8, 2023
@davidthor davidthor added the enhancement New feature or request label Aug 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant