83 Commits
Author SHA1 Message Date
Ben Banfield-Zanin 894b2baa3b CI: retry more status codes 2026-11-13 10:48:38 +00:00
Ben Banfield-Zanin 54ac44b2f8 CI: retry user registration on HTTP 400s 2026-11-13 10:29:12 +00:00
Gaël Goinvic 8c358a4b99 Merge pull request #1695 from element-hq/gaelg/flakes-service-monitors
Retry using curl retries instead of kubernetes container restarts
2026-10-20 11:12:58 +02:00
Gael Goinvic 465b00dc4d Adjust _terminated_state for clarity 2026-10-20 08:26:32 +00:00
Gael Goinvic b2354f88b9 Use async_retry_with_timeout and drop restart_policy argument
run_pod_with_args now hardcodes RestartPolicy="Never"
2026-10-19 15:19:15 +00:00
Gael Goinvic 0b7115bf03 Wait 5 min for CRD/Deployments/Statefulsets 2026-10-19 14:26:05 +00:00
Gael Goinvic f3de1349c8 Retry using curl retries instead of kubernetes container restarts 2026-10-19 13:59:27 +00:00
Gael Goinvic 31a8d17bdd Replace pytest-kubernetes Kubectl with lightkube AsyncClient 2026-10-16 14:45:22 +00:00
Gael Goinvic c3da912d69 Replace pytest-kubernetes Kubeclient.exec with lightkube AsyncClient.exec 2026-10-16 14:32:59 +00:00
Gael Goinvic 15dc4ba6d8 Add a helper to wait for charts used in tests 2026-10-16 13:57:35 +00:00
Gael Goinvic 201e1a263e Only expect 5xx errors when installing or upgrading from a chart version without preStop support 2026-10-15 13:30:46 +00:00
Gael Goinvic f19ca2d1a4 Use a playwright controller -> browser in docker model 2026-10-07 12:59:47 +00:00
Quentin Gliech c0bb9fdf82 Tests: Add Playwright browser fixtures
The browser is a headless Chromium shared across the session, with one
isolated context per test. Chromium resolves *.localhost to loopback on
its own so requests reach the k3d ingress the same way the aiohttp based
tests do, and certificate validation is disabled as the test CA isn't in
its trust store.
2026-10-07 12:59:46 +00:00
Gael Goinvic fe99adb0b9 Fix flakes when uploading medias
The body is created using the single-use async generator - on retries,
it re-uses the same (consumed) generator object. It caused the request
to abrutly stopped, resulting in Traefik returning HTTP 499 Client
Closed Connection.

The fix makes sure that a new generator is initialized if we have to
retry media upload.
2026-10-07 12:19:16 +00:00
Gael Goinvic 6152274a40 Make test code compatible with python 3.11 2026-09-29 13:17:21 +00:00
Gael Goinvic 674e23c119 Add a workaround for the async iterable behavior 2026-09-03 11:39:25 +00:00
Gael Goinvic 16464a6895 Validate that we can now upload 200KB files 2026-09-03 09:30:47 +00:00
Gael Goinvic 95affb6cb8 CI: Upload a random 200KB file instead of a minimal.png img 2026-09-03 07:41:13 +00:00
Gael Goinvic bdcdd17b1c Fix aiohttp deprecation warning about authentication header
Fix the following warning:
```
/home/runner/work/ess-helm/ess-helm/tests/integration/lib/matrix_authentication_service.py:32:
DeprecationWarning: BasicAuth is deprecated and will be removed in
aiohttp 4.0; use aiohttp.encode_basic_auth() with
headers={'Authorization': ...} instead
  auth=aiohttp.BasicAuth("000000000000000PYTESTADM1N",
generated_data.mas_oidc_client_secret),
```
2026-08-28 10:01:51 +00:00
Gaël Goinvic 443517e6fc pyhelm: log more from cache 2026-03-27 17:39:56 +01:00
Gaël Goinvic aee084699c Cache pyhelm charts in github workspace directory 2026-03-27 15:08:06 +01:00
Gaël Goinvic a07c43779f allow to pass an additional test values file 2026-03-26 15:08:42 +01:00
Gael Gate b88441ad0c Improve chart cache error message 2026-03-05 10:59:06 +01:00
Gaël Goinvic 0ab5d12294 ci: retry setting up prometheus operator crds 2026-02-25 16:45:04 +01:00
Gaël Goinvic 8a2302f771 chart_from_ci_cache should not be a generator
- In case of exception, it yields twice, which is invalid contextmanager
behaviour
2026-02-25 11:07:05 +01:00
Gaël Goinvic bbb079b64b remove existing cached_ref if it exists 2026-02-25 11:07:05 +01:00
Gaël Goinvic 0a4c76fa3e always pull remote chart, only fallback to cache if remote fails 2026-02-20 17:07:07 +01:00
Gaël Goinvic 08481a2739 pytest: cache the pyhelm oci files
- In CI, helm dependencies are going to be cached
- When running locally, the cache mechanism is not used
2026-02-20 17:07:07 +01:00
Gaël Goinvic 95a449fa9a Instanciate the cluster using pytest
- This removes code duplication between bash & pytest
- Pytest now exists early if `TEST_VALUES_FILE` is not set
2026-01-30 16:32:38 +01:00
Gaël Goinvic b6aeb9c295 hookshot integration test - passes
- Successfully creates a webhook
- Joins the admin room to get the webhook url
- Makes sure we can wend a POST request and that it generates a message
  in the room timeline
2026-01-19 17:58:48 +01:00
Ben Banfield-Zanin ac77363672 Stop test_pods_monitored flaking 2025-11-26 15:47:13 +00:00
Ben Banfield-Zanin 50f65012f7 git ls-files | xargs sed -i '/^# Copyright .* New Vector Ltd/a # Copyright 2025 Element Creations Ltd' 2025-10-27 09:36:54 +00:00
Ben Banfield-Zanin 113c585313 Dont manage user passwords in MAS tests if password logins are disabled 2025-10-10 11:39:48 +01:00
Ben Banfield-Zanin 20243ec256 Support re-running tests against an existing MAS DB 2025-10-10 11:39:43 +01:00
Ben Banfield-Zanin 1ad59b893f Invalidate cached access tokens in tests if they aren't usable 2025-10-10 11:38:26 +01:00
Gaël Goinvic b51d2bf65f tests: restart curl pods on failure to fetch metrics 2025-09-16 11:40:38 +02:00
Gaël Goinvic e7e07ad60c dont delete curl pods on error 2025-09-15 15:42:18 +02:00
Andrew Ferrazzutti 758c847ba0 Merge pull request #728 from element-hq/af/mas-test-synapse-admin-token
tests: add Synapse API scope to MAS admin users
2025-09-12 10:59:27 -04:00
Gaël Goinvic f2e8100d81 use state instead of lastState 2025-09-12 16:31:12 +02:00
Gaël Goinvic b770fb3090 give 60 seconds to start to pods 2025-09-12 16:13:22 +02:00
Gaël Goinvic 5b715a812c run pod with args: properly raise an error if its not ready in time 2025-09-12 16:13:06 +02:00
Andrew Ferrazzutti b551d45c63 tests: add Synapse API scope to MAS admin users
When creating a MAS user for tests, if the user is to be a Synapse
admin, ensure that its OAuth 2.0 token is granted the scope for making
requests to the Synapse Admin API.
2025-09-12 00:20:49 -04:00
Gaël Goinvic 77bc13d915 add conditional in the helper as well 2025-08-13 14:48:31 +02:00
Gaël Goinvic d8d6b1456d add dockerhub secret to curl pods 2025-08-13 12:58:43 +02:00
Ben Banfield-Zanin bbc87ca744 More fixing of the Synapse routing test flakes 2025-08-06 12:13:34 +01:00
Ben Banfield-Zanin 71eabde0a2 CI: add headers to aiohttp_get_json 2025-08-06 12:13:29 +01:00
Ben Banfield-Zanin 57e23c9ca3 Don't retry ClientResponseError, we end up retrying all 4xx/5xx statuses as a result 2025-07-29 13:52:41 +01:00
Gaël Goinvic 183895163e wait for all replicasets to be ready 2025-07-28 09:25:09 +02:00
Ben Banfield-Zanin c9d3c018a8 Split the root CA PEM into ca.crt and only include leaf and intermediate CAs certs in tls.crt 2025-07-09 14:07:44 +01:00
Ben Banfield-Zanin 24c3802577 Only trust the root CA 2025-07-09 14:04:36 +01:00