You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -42,8 +44,8 @@ The provider has two types of tests:
42
44
Unit tests can be run without any credentials:
43
45
44
46
```bash
45
-
make test# Run all unit tests
46
-
make test-short # Run unit tests in short mode
47
+
make test# Run all unit tests with coverage
48
+
make test-short # Run unit tests in short mode (CI runs these with coverage enabled)
47
49
```
48
50
49
51
### Acceptance Tests
@@ -58,20 +60,26 @@ Acceptance tests run against a **pre-created Ory project**. The project must be
58
60
cp .env.example .env
59
61
```
60
62
61
-
The `.env` file is gitignored and automatically loaded by `make` targets. At minimum you need:
63
+
The `.env` file is gitignored and automatically loaded by `make` targets.
64
+
65
+
**Required** (validated by `make env-check`):
62
66
63
67
```bash
64
-
# Workspace credentials
65
68
ORY_WORKSPACE_API_KEY=ory_wak_...
66
69
ORY_WORKSPACE_ID=...
70
+
```
71
+
72
+
**Recommended** (needed by most resource tests):
67
73
68
-
# Pre-created test project
74
+
```bash
69
75
ORY_PROJECT_ID=...
70
76
ORY_PROJECT_SLUG=...
71
77
ORY_PROJECT_API_KEY=ory_pat_...
72
78
ORY_PROJECT_ENVIRONMENT=prod
73
79
```
74
80
81
+
When set, tests use this persistent project instead of creating ephemeral ones. The project must have keto namespaces and dynamic client registration configured. See `.env.example` for the full list of variables.
82
+
75
83
#### Running Acceptance Tests
76
84
77
85
```bash
@@ -94,6 +102,8 @@ Some tests require specific Ory plan features. Enable them with environment vari
94
102
|`ORY_PROJECT_TESTS_ENABLED=true`| Run project creation/deletion tests |
95
103
|`ORY_EVENT_STREAM_TESTS_ENABLED=true`| Run event stream tests (requires Enterprise plan + AWS setup below) |
96
104
105
+
> **Note:** CI enables **all** feature flags, including `ORY_PROJECT_TESTS_ENABLED`, on pull requests. Locally, `make test-acc-all` enables all flags **except**`ORY_PROJECT_TESTS_ENABLED` by default (project creation/deletion tests are excluded because they are slow and potentially destructive). To run those locally, set `ORY_PROJECT_TESTS_ENABLED=true` explicitly.
106
+
97
107
#### Event Stream Tests
98
108
99
109
Event stream tests have additional requirements beyond a feature flag because they interact with real AWS infrastructure:
@@ -208,7 +218,7 @@ To use a locally built provider, create a `~/.terraformrc` file:
0 commit comments