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
1. A function `prepare(helper: IntegrationTestHelper)` for setting up your test case. Usually, you will want to
55
+
1.`get_router()` should return an `APIRouter` object to define mock responses for specific HTTP requests. All web requests are intercepted by an HTTP proxy.
56
+
Refer to `tests_integration.lib.shared.get_transparent_urls` to define URLs that should not be intercepted.
57
+
58
+
2.`prepare(helper: IntegrationTestHelper)` for setting up your test case. Usually, you will want to
58
59
overwrite the feedstock repository in the test environment. The `IntegrationTestHelper` provides methods to interact
59
60
with the test environment.
60
61
61
-
2. A `router` object to define mock responses for specific HTTP requests. All web requests are intercepted by an HTTP proxy.
62
-
Consult `tests_integration.lib.shared.get_transparent_urls` to define URLs that should not be intercepted.
63
-
64
62
3. A function `validate(helper: IntegrationTestHelper)` for validating the state after the bot has run.
65
63
The `IntegrationTestHelper` provides convenience methods such as `assert_version_pr_present` to check for the presence
66
64
of a version update PR.
@@ -119,44 +117,25 @@ For example, scenario 1 uses `test_case_3.py` from Feedstock A and `test_case_2.
119
117
## Environment Variables
120
118
The tests expect the following environment variables:
|`TEST_SETUP_TOKEN`| Classic PAT for `cf-regro-autotick-bot-staging` used to setup the test environment. Typically, this is identical to `BOT_TOKEN`. |
125
-
|`GITHUB_RUN_ID`| Set by GitHub. ID of the current run. Used as random seed. |
|`BOT_TOKEN`| Classic PAT for `cf-regro-autotick-bot-staging`. Used to interact with the test environment. |
123
+
|`TEST_SETUP_TOKEN`| Classic PAT for `cf-regro-autotick-bot-staging` used to setup the test environment. Typically, this is identical to `BOT_TOKEN`. |
124
+
|`GITHUB_RUN_ID`| Set by GitHub. ID of the current run. Used as random seed. |
126
125
127
126
128
127
We do not use `BOT_TOKEN` instead of `TEST_SETUP_TOKEN` for setting up the test environment to allow for future separation of the two tokens.
129
128
Furthermore, `BOT_TOKEN` is hidden by the sensitive env logic of `conda_forge_tick` and we want the test environment to not need to rely on this logic.
130
129
131
130
132
131
### GitHub Token Permissions
133
-
The token should have the following scopes: `repo`, `workflow`, `delete_repo`.
132
+
The bot token (which you can should use as the test setup token) should have the following scopes: `repo`, `workflow`, `delete_repo`.
134
133
135
134
## Running the Integration Tests Locally
136
135
137
136
To run the integration tests locally, you currently need to have a valid token for the `cf-regro-autotick-bot-staging` account.
138
-
Besides that, the further setup is described below.
139
-
140
-
### Generate CA Certificates
141
-
142
-
For mitmproxy to properly intercept HTTPS traffic, you need to generate a CA certificate:
0 commit comments