diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 07e5be9e9..15d5333d7 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -5,6 +5,9 @@ ### What is the impact of this change? ### How was this change tested? +- Have you run `hatch run test` ? + +- Have you run `hatch run integ:test` ? See `DEVELOPMENT.md` on "Run integration tests" ### Was this change documented? diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md index f8b210386..8f424677f 100644 --- a/DEVELOPMENT.md +++ b/DEVELOPMENT.md @@ -54,10 +54,29 @@ hatch run test ``` ## Run integration tests + +- Setup Environment Variables +```bash +export SERVICE_ACCOUNT_ID=001122334455 +export JOB_ATTACHMENTS_BUCKET="{deadline queue configured Job Attachments S3 bucket.}" +export JA_TEST_ROOT_PREFIX="/your/path/root" +export FARM_ID="farm-{uuid}" +export AWS_DEFAULT_REGION="us-west-2" +``` + +- Optional Environment Variables +```bash +export AWS_ENDPOINT_URL_DEADLINE="https://deadline.{region}.amazonaws.com" +export INTEG_TEST_JA_CROSS_ACCOUNT_BUCKET="Your regional S3 bucket in another account" +``` + +- Running the integration tests. ``` hatch run integ:test ``` +- Notes: + - If the integration test is run in any region other than `us-west-2`, please set the enviornment variable `INTEG_TEST_JA_CROSS_ACCOUNT_BUCKET`. The bucket must be from another AWS account in the same region as the farm setup to run this test. ## Run linting ``` hatch run lint @@ -73,6 +92,9 @@ hatch run fmt hatch run all:test ``` +## Running Job Attachments Integration tests. + + ## Qt and Calling AWS (including AWS Deadline Cloud) APIs > TL;DR Never call an AWS API from the main Qt event loop. Always run it in a separate thread, diff --git a/test/integ/deadline_job_attachments/conftest.py b/test/integ/deadline_job_attachments/conftest.py index cc1656974..fa1f1bb4f 100644 --- a/test/integ/deadline_job_attachments/conftest.py +++ b/test/integ/deadline_job_attachments/conftest.py @@ -1,6 +1,7 @@ # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. import getpass +import os import json import sys import pytest @@ -98,7 +99,7 @@ def external_bucket() -> str: """ Return a bucket that all developers and test accounts have access to, but isn't in the testers account. """ - return "job-attachment-bucket-snipe-test" + return os.environ.get("INTEG_TEST_JA_CROSS_ACCOUNT_BUCKET", "job-attachment-bucket-snipe-test") def is_windows_non_admin():