Skip to content

Repository files navigation

UID2 E2E Test Suites

This repository contains test suites (src/test/java) for end-to-end validation of client-facing APIs. The test suites simulate real API requests with mock data and send them to operators via HTTP. This can be done against both mock and real operators.

Any changes to uid2-operator need to be tested against the Java end-to-end test suites. The same test suites will be executed during all operator release builds.

Test Suites

There are different test suites that can be run depending on the environment and operator type:

Test SuiteDescription
E2ELocalFullTestSuiteUsed to test all apps locally
E2ECoreTestSuiteUsed when testing Core
E2EPublicOperatorTestSuiteUsed when testing public Operators
E2EPrivateOperatorTestSuiteUsed when testing private Operators

Environment Variables

  • E2E_SUITES - Docker image only - The test suites to run, comma separated
    • e.g. E2EPrivateOperatorTestSuite,E2ECoreTestSuite
  • E2E_ARGS_JSON - The below environment variables can be put into this environment variable as a JSON
    • Any environment variables declared explicitly will override args in E2E_ARGS_JSON

General

NameValue
E2E_ENVThe E2E environment - this determines which apps get instantiated
Certain tests run for local environments only
Check AppsMap for details
E2E_IDENTITY_SCOPEThe identity scope - one of [UID2, EUID]
E2E_PHONE_SUPPORTTrue if APIs support phone numbers, false otherwise

Core

NameValue
UID2_CORE_E2E_OPERATOR_API_KEYThe API key for an Operator to communicate with Core
UID2_CORE_E2E_OPTOUT_API_KEYThe API key for Optout to communicate with Core
UID2_CORE_E2E_CORE_URLThe Core URL to include in attestation requests
UID2_CORE_E2E_OPTOUT_URLThe Optout URL to include in attestation requests

Operator

NameValue
UID2_OPERATOR_E2E_CLIENT_SITE_IDThe site ID of the client communicating with Operator
UID2_OPERATOR_E2E_CLIENT_API_KEYThe API key for a client to communicate with Operator
UID2_OPERATOR_E2E_CLIENT_API_SECRETThe API secret for a client to communicate with Operator
UID2_OPERATOR_E2E_CLIENT_API_KEY_BEFORE_OPTOUT_CUTOFFOptout cutoff tests - The API key before the optout policy cutoff for a client to communicate with Operator
UID2_OPERATOR_E2E_CLIENT_API_SECRET_BEFORE_OPTOUT_CUTOFFOptout cutoff tests - The API secret before the optout policy cutoff for a client to communicate with Operator
UID2_OPERATOR_E2E_CLIENT_API_KEY_SHARING_RECIPIENTSharing tests - The API key with SHARER role for a client to communicate with Operator
UID2_OPERATOR_E2E_CLIENT_API_SECRET_SHARING_RECIPIENTSharing tests - The API with SHARER role secret for a client to communicate with Operator
UID2_OPERATOR_E2E_CLIENT_API_KEY_NON_SHARING_RECIPIENTSharing tests - The API key without SHARER role for a client to communicate with Operator
UID2_OPERATOR_E2E_CLIENT_API_SECRET_NON_SHARING_RECIPIENTSharing tests - The API without SHARER role secret for a client to communicate with Operator
UID2_OPERATOR_E2E_CSTG_SUBSCRIPTION_IDCSTG tests - The subscription ID
UID2_OPERATOR_E2E_CSTG_SERVER_PUBLIC_KEYCSTG tests - The server public key
UID2_OPERATOR_E2E_CSTG_ORIGINCSTG tests - A valid origin
UID2_OPERATOR_E2E_CSTG_INVALID_ORIGINCSTG tests - An invalid origin

Pipeline

NameValue
UID2_PIPELINE_E2E_CORE_URLThe Core URL
UID2_PIPELINE_E2E_OPERATOR_URLThe Operator URL
UID2_PIPELINE_E2E_OPERATOR_TYPEThe type of Operator - one of [PUBLIC, PRIVATE]
UID2_PIPELINE_E2E_OPERATOR_CLOUD_PROVIDEREmpty for public Operators, the cloud provider for private Operators - one of [aws-nitro, gcp-oidc, azure-cc]

Running the Dockerfile

docker build -f Dockerfile -t uid2-e2e .
docker run --env <ENV>=<VAR> ... uid2-e2e
  • If running the E2E tests against localhost, include the option --network=host

About

Test suites for end-to-end validation of client-facing UID2 APIs

Resources

Stars

1 star

Watchers

6 watching

Forks

Releases

Packages

Used by

Contributors

Languages