radicalplatforms/shafa

Implement remote preflight test on prod, stage

Opened this issue · 0 comments

Description

Figure out a way to run preflight tests against a remote system. The goal of these remote preflight checks is to ensure that a remote system is performing as expected after deployment. For example, say we deploy a new release to production. How can we verify that production is acting the way it is supposed to even if the deployment "succeeded"? This is where the remote preflight tests come in. These preflight tests are limited to the hono backend only.

The preflight tests themselves will be written in 3 user stories that are linked in seperate issues (#61, #62, #63, #65). This issue blocks the completion of those issues (for now) since there is a chance the way unit tests are written will change.

A good implementation of this issue will:

  • Add a Github Workflow job (hono_integration) that is triggered after a deployment to a staging env succeeds, runs preflight on this remote instance
  • Add a Github Workflow job (deploy_production) that is triggered after a deployment to a production env succeeds, runs preflight on this remote instance
  • Figure out how to have jest unit tests hit a remote url / instance
  • Figure out how to hit remote urls from a Github Actions runner (might block outbound traffic by default)

Acceptance Criteria

Generated by Zenhub AI

  • Scenario: Remote preflight test on prod
  • Given a new release is deployed to production
  • When a Github Workflow job (deploy_production) is triggered after the deployment succeeds
  • Then the remote preflight tests are run on the production instance
  • Scenario: Remote preflight test on stage
    • Given a new release is deployed to staging
    • When a Github Workflow job (hono_integration) is triggered after the deployment succeeds
    • Then the remote preflight tests are run on the staging instance
  • Scenario: Unit tests hitting a remote URL
    • Given jest unit tests are written to hit a remote URL
    • When the tests are run
    • Then the tests should pass and verify the remote system's performance
  • Scenario: Github Actions runner hitting remote URLs
    • Given a Github Actions runner is set up to hit remote URLs
    • When the remote preflight tests are run from the Github Actions runner
    • Then the tests should pass and verify the remote system's performance