core, store: merge master into names (#8298)

* core, ui: validate short link type, show contact info for long addresses and rejected contacts (#8184)

* tests: short link type, QR code capacity and contact statuses

* core: validate the type of short links

* android, desktop: show contact info for addresses above QR code capacity

* ui: show chats with rejected contact requests

* tests: short link types with group, channel and contact data

* core: validate short link type against link data

* tests: fix short link data test

* tests: group data in invitation link before its first use

* tests: connect via address in contact profile with group link

* core: connect via contact address only with address links

* core: parse short link data once, by link type

* core: types of short link data parser

* core: test short link types and contact rejection, record app fixtures

* android, desktop: test contact info, link alerts and rejected contacts

* ios: test invalid link alerts and rejected contacts in the chat list

* desktop: contact info tests find texts without app resources

* ui: core responses of invalid link plans and a rejected contact request

* desktop: contact info tests provide the app bar handler

* core: normalise file and message keys in app test fixtures

* core: normalise deletion times in app test fixtures

* desktop: test that a QR code above capacity is not shared on tap

* core: test relay link checks and known channel refresh from link data

* libs: nodejs 7.1.4 (#8263)

* nodejs: live test reads the updated item under the key of 7.1 and 7.2 cores

* libs: nodejs 7.1.4

* mcp: session states coloured by what they need, green for working (#8265)

* mcp: session states in the colours of what they need: green working, orange waiting in the chat, red idle

* mcp: the space after waiting for you in the tests

* mcp: a session with a background command shows working in the background

* mcp: a readable README, and the roadmap lines of 0.3.0 (#8264)

* mcp: readme by what the plugin does for its users, roadmap lines of 0.3.0

* mcp: almost every waiting state

* mcp: reply, edit and react in one line

* mcp: flat layout without the avatar note

* mcp: sessions use flat layout

* mcp: shorter lines on answers, the Main group and approvals

* mcp: approvals line without the taps

* mcp: live stream line

* mcp: status line

* mcp: shorter lines

* mcp: 0.3.1 with simplex-chat 7.1.4 (#8266)

* docs: testing approaches of the codebase (#8255)

* docs: app changes come with app tests on the core's recorded responses (#8252)

* ci: decide the library claim from the written releases (#8137)

* ci: test the library claim when reads return the previous releases

* ci: decide the library claim from the written releases

* tests: record name fixtures after the channel join settles (#8250)

* core, ci: update sqlcipher-simple to 0.4.19.0 and simplexmq (#8270)

* update sqlcipher-simple to 0.4.19.0

* sqlcipher-simple from simplex-chat/sqlcipher-simple

* update simplexmq

* ci: restore source repositories only for the same cabal.project

* ci: keep restored source checkouts only at their pinned commits

* android, desktop, ios: copy markdown files with line breaks, and the whole file with one button (#8269)

* android, desktop: test copying lines from the markdown text view

* android, desktop: keep line breaks in text copied from markdown files

* android, desktop: check the last copied text in the markdown view test

* android, desktop, ios: button to copy the whole markdown file

* android, desktop: test the markdown file copy button

* android, desktop, ios: ask before copying markdown files over 128 KB

* android, desktop, ios: title the markdown copy alerts File too large

* ios: test the markdown file copy button

* android, desktop, ios: preview the markdown file view and test the copy limit

* android, desktop, ios: snapshot references of the markdown file view

* docs: names conditions describe upgradeable registry contracts (#8277)

* docs: names conditions describe upgradeable registry contracts

* docs: names conditions without the immutability after stabilization

---------

Co-authored-by: brenzi-agent <346870783+brenzi-agent@users.noreply.github.com>

* ci: reproducible Linux builds of 7.1 releases (#8276)

* ci: plan reproducible Linux builds of 7.1 releases

* ci: reproduce Linux builds with the cabal store path of releases

* ci: reproduce releases with the current reproduce script

* ci: build in the image with the cabal directory of releases

* ci: reproduce releases on the Ubuntu 24.04 runner

* ci: correct the failure history and rollout in the plan

---------

Co-authored-by: sh-agents <350651734+sh-agents@users.noreply.github.com>

* website: remove the webinar promotion (#8281)

* website: remove the webinar invitation from the home page

* website: redirect the livestream page to Wefunder

* mcp server: recall the chat history in a new agent session (#8141)

* mcp server: recall the chat history in a new agent session

* docs: chat history in receive for a new agent session

* mcp server: type the history page for the compiler

* mcp server: recall the chat history after a compaction too

* docs: history plan changes with the message helpers of master

Claude-Session: https://claude.ai/code/session_01AV2VpomCCQNciqggT9gr75

* docs: drop anchor remapping from the docs table of the history plan

Claude-Session: https://claude.ai/code/session_01AV2VpomCCQNciqggT9gr75

---------

Co-authored-by: brenzi-agent <346870783+brenzi-agent@users.noreply.github.com>

* core: prevent stalled join of channel subscribers to a new relay (#8239)

* core: save relay connection before requesting relay link data

* core: share relay connection creation between join and retry

* tests: connect to a re-added relay when its connection is saved late

* tests: delay only the relay connection record, not the command

* ci, tests: run all tests in CI (#8238)

* bots, tests: run broadcast bot test in CI

* tests: test moderation that arrives before the message

* ci, tests: run all tests in CI

* tests: update re-enabled tests, restore query plans, PostgreSQL schema from CI

* tests: remove CI skip helpers no longer used

* tests: expect XFTP AUTH error of cancelled standalone file

* tests: update query plans from CI

* tests: update query plans from CI

* tests: expect group history and member contacts in async group test

* tests: accept subscription summary after first events on restart

* tests: make AUTH and client timeout direct tests deterministic

* tests: keep bob's badge clock before renewal until the move back

* tests: keep the quota of 2 messages only on the member's receive queue

* tests: keep query plans files with repeated entries of one query

* tests: update query plans from CI

* tests: stop the host before a member requests to join with a badge

* tests: remove repeated entries of one query from query plans files

* tests: accept the refusal of an unknown remote host after its session code

* ci: state when the query plans test fails

* tests: skip multicast discovery on macOS CI runners

* tests: accept a remote host started with one local address

* tests: restore the client timeout test except its zero timeout

* tests: fail when a remote host prints another line than its other addresses

* ci: name the tests that overwrite generated files

* tests: move the badge clock after the restoring device arms its wake

* tests: keep both members on the quota server in the member inactivity test

* tests: accept subscription summaries in any order in the async group test

* tests: update query plans from CI

* tests: quota of 2 only on bob's queues in member inactivity test

* tests: connect to a deleted link after its queue is deleted

* core: save relay connection before requesting relay link data

* core: share relay connection creation between join and retry

* tests: connect to a re-added relay when its connection is saved late

* tests: delay only the relay connection record, not the command

* tests: record API fixtures on SQLite only

* core: update query plans

* ci: run PostgreSQL tests with the steps of build-linux

* desktop: prevent crash on Linux with bitmap and WOFF2 fallback fonts (#8288)

* desktop: prevent crash on Linux with bitmap and WOFF2 fallback fonts

* desktop: record time offsets and snapshots rendered with Skia m138

* desktop: name the time offset test, skip only a missing fc-cache, update plan

---------

Co-authored-by: sh-agents <350651734+sh-agents@users.noreply.github.com>

* core, directory: stop cancelled actions instead of continuing them (#8279)

* ci: retry npm install once after a failure (#8280)

* core: query plans of the store group tests that master now verifies

---------

Co-authored-by: brenzi-agent <346870783+brenzi-agent@users.noreply.github.com>
Co-authored-by: sh-agents <justcheckingifitwillwork@gmail.com>
Co-authored-by: sh-agents <350651734+sh-agents@users.noreply.github.com>
Co-authored-by: brenzi-agent <brenzi-agent@brenzi.ch>
Co-authored-by: Evgeny Poberezkin <evgeny@poberezkin.com>
This commit is contained in:
authored and GitHub committed 2026-11-21 23:35:25 +00:00
1 parent 0410929c9d
commit 533bfd8ff5
166 files changed
+2609 -445

No files matched your search

+22 -5
View File
@@ -27,15 +27,16 @@ Endpoint: https://docs.github.com/en/rest/actions/workflows#create-a-workflow-di
| `tests` | empty | hspec match patterns, one per line (`\n` in JSON); `/` runs the whole suite, and an empty value builds without tests |
| `base` | `master` | the branch that the changes are compared with:<br>`stable` for a branch cut from stable<br>the parent branch for a stacked branch |
When a newer dispatch on the same branch starts build-linux or build-ios, GitHub cancels the unfinished job of the older one (`cancel-in-progress`).
When a newer dispatch on the same branch starts build-linux, test-postgres or build-ios, GitHub cancels the unfinished job of the older one (`cancel-in-progress`).
Results:
- Run and jobs: `GET /repos/<owner>/simplex-chat/actions/runs?head_sha=<commit>&event=workflow_dispatch` returns the run id; `GET /repos/<owner>/simplex-chat/actions/runs/<run id>/jobs` returns each step with its start, end and conclusion.
- Job log: `GET /repos/<owner>/simplex-chat/actions/jobs/<job id>/logs` returns a redirect to a text file, valid for 1 minute (https://docs.github.com/en/rest/actions/workflow-jobs#download-job-logs-for-a-workflow-run). The test summary is printed as "Finished in N seconds" and "N examples, N failures".
- Generated files: `GET /repos/<owner>/simplex-chat/actions/runs/<run id>/artifacts` lists an artifact `generated-files-<job>` for each job in which a test changed a tracked file (step "Check generated files"). It holds generated-files.patch, which `git apply` applies to the tested commit.
### Scopes
The reduced build runs one Linux job, build-linux (ubuntu-22.04 x86_64), for every scope except ios, and one macOS job, build-ios (macos-latest), for ios.
The reduced build runs the Linux job build-linux (ubuntu-22.04 x86_64) for every scope except ios, the Linux job test-postgres (ubuntu-22.04 x86_64) for core, and the macOS job build-ios (macos-latest) for ios.
#### core
@@ -44,8 +45,17 @@ The reduced build runs one Linux job, build-linux (ubuntu-22.04 x86_64), for eve
- Docker image (step "Build and cache Docker image");
- caches (the steps "Restore ... from cache");
- `cabal build -j --enable-tests --ghc-options=-O0` (step "Build CLI");
- simplex-chat-test with the selected tests (step "Run tests"), each attempt limited to 35 minutes by `timeout`; an attempt that reaches the limit fails, and "Attempt <n> timed out." is printed.
- App test fixtures: core tests write the core's responses and events that the app tests use to tests/fixtures/api (`/names tests/` to tests/fixtures/api/names, `/contact via address/` to tests/fixtures/api/connect, `/updated item event has the previous item/`, `/should send updated item with mentions added and removed by edit/` and `/mark call invitation missed when the caller ends the call/` to tests/fixtures/api/updates), and fail when a recording differs from the committed file; the rewritten files are committed, and the kotlin and ios scopes run for them.
- the store service web app, `npm ci` and `npm run build` in apps/simplex-store-service/web with Node.js 22, for the test "serves the built web app" (step "Build badge web app for tests");
- simplex-chat-test with the selected tests (step "Run tests"), each attempt limited to 35 minutes by `timeout`; an attempt that reaches the limit fails, and "Attempt <n> timed out." is printed;
- step "Check generated files": it fails if a test changed a tracked file, and uploads the change as artifact `generated-files-<job>`. The tests "verify and overwrite schema dump", "verify and overwrite query plans" and the "generate ..." tests of the API docs overwrite their files, so a stale file fails here even when the test passes on retry.
- App test fixtures: core tests write the core's responses and events that the app tests use to tests/fixtures/api (`/names tests/` to tests/fixtures/api/names; `/contact via address/`, `/should validate link type/` and `/reject contact and notify the sender/` to tests/fixtures/api/connect; `/updated item event has the previous item/`, `/should send updated item with mentions added and removed by edit/` and `/mark call invitation missed when the caller ends the call/` to tests/fixtures/api/updates), and fail when a recording differs from the committed file; the rewritten files are committed, and the kotlin and ios scopes run for them.
- CI, in test-postgres, except on stable and v* tags: the steps of build-linux with the matrix parameter `postgres` and these job settings:
- the Docker image and dependency cache of build-linux, and its own build directory cache `dist-postgres-<target>`;
- simplex-chat-test built with `--constraint 'simplexmq +client_postgres' --constraint 'simplex-chat +client_postgres'` at -O0 (step "Build CLI");
- PostgreSQL 15 in Docker, with trust authentication and `max_connections=3000`, and postgresql-client-15 for pg_dump;
- the selected tests with `PGHOST=localhost`, each attempt limited to 60 minutes; `ALLOW_EMPTY=true` omits `--fail-on=empty`, so a selection of SQLite-only tests runs nothing here;
- step "Check generated files", artifact `generated-files-ubuntu-22.04-ghc<version>-postgres`.
- Query plans: the test "verify and overwrite query plans" runs on Linux only. It explains the queries recorded in the run and the queries of the saved files (src/Simplex/Chat/Store/SQLite/Migrations/*_query_plans.txt), writes each query once, and fails when a file changed: a recorded query was missing, a plan changed, or a merge left two entries of one query. Saved queries that the run did not record are kept, except those whose plan became an error. Queries that run only on retries or other timing-dependent paths are added by the first run that records them.
- Local:
```sh
cp scripts/cabal.project.local.linux cabal.project.local
@@ -59,6 +69,13 @@ The reduced build runs one Linux job, build-linux (ubuntu-22.04 x86_64), for eve
```
`--ghc-options=-O0` matches the reduced build; the library and test-suite stanzas of simplex-chat.cabal set -O2. Test directories are created under tests/tmp (`tmpBracket` in tests/Test.hs).
On PostgreSQL, with pg_dump 15 or newer on PATH:
```sh
docker run -d -p 5432:5432 -e POSTGRES_HOST_AUTH_METHOD=trust postgres:15 -c max_connections=3000
cabal build --enable-tests --ghc-options=-O0 --constraint 'simplexmq +client_postgres' --constraint 'simplex-chat +client_postgres' test:simplex-chat-test
PGHOST=localhost ALLOW_EMPTY=true TESTS='/SimpleX chat client/group tests/' scripts/ci/run-tests.sh "$(cabal list-bin --enable-tests --ghc-options=-O0 --constraint 'simplexmq +client_postgres' --constraint 'simplex-chat +client_postgres' test:simplex-chat-test)"
```
#### kotlin
- Globs: `BUILD_CHANGES["kotlin"]` in packages_release.py.
@@ -68,7 +85,7 @@ The reduced build runs one Linux job, build-linux (ubuntu-22.04 x86_64), for eve
cd apps/multiplatform
./gradlew --no-daemon --max-workers=1 :common:desktopTest :desktop:compileKotlinJvm -x :desktop:cmakeBuildAndCopy :android:compileGoogleDebugKotlin :android:testFossDebugUnitTest
```
JDK 17 and an Android SDK in ANDROID_HOME are required, as installed by Dockerfile.build.
JDK 17 and an Android SDK in ANDROID_HOME are required, and on Linux fontconfig's `fc-cache` for `FallbackFontTest`, as installed by Dockerfile.build.
#### ios
+8
View File
@@ -0,0 +1,8 @@
#!/bin/bash
set -euo pipefail
npm install --no-audit --no-fund "$@" && exit
echo "npm install failed, retrying in 7 minutes" >&2
sleep 420
npm install --no-audit --no-fund "$@"
+3 -2
View File
@@ -7,6 +7,7 @@ nodejs=packages/simplex-chat-nodejs
python_package=packages/simplex-chat-python
python=$(command -v python3 || command -v python)
temp=${RUNNER_TEMP:-$(mktemp -d)}
npm_install=$PWD/scripts/ci/npm-install.sh
usage() {
echo "usage: $0 build <platform> | test | addon <platform> | publish <platform> [nodejs] [python]" >&2
@@ -14,8 +15,8 @@ usage() {
}
build_package() {
(cd packages/simplex-chat-client/types/typescript && npm install --no-audit --no-fund && npx tsc)
(cd "$nodejs" && npm install --ignore-scripts --no-save --no-audit --no-fund ../simplex-chat-client/types/typescript)
(cd packages/simplex-chat-client/types/typescript && "$npm_install" && npx tsc)
(cd "$nodejs" && "$npm_install" --ignore-scripts --no-save ../simplex-chat-client/types/typescript ${1:+node-gyp})
if [ -n "${1:-}" ]; then
(cd "$nodejs" && npx --yes node-gyp rebuild)
fi
+7 -7
View File
@@ -651,15 +651,15 @@ def read_releases() -> tuple[dict, str | None]:
return tomllib.loads(base64.b64decode(file["content"]).decode()), file["sha"]
def record_releases(entries: list[tuple[str, str]], commit: str) -> str:
"""Adds the entries in one commit of simplex-chat-libs and returns that commit."""
def record_releases(entries: list[tuple[str, str]], commit: str) -> tuple[dict, str]:
"""Adds the entries in one commit of simplex-chat-libs and returns the releases of that commit with its sha."""
message = ", ".join(f"{key} {version}" for key, version in entries)
attempt = 1
while True:
releases, blob = read_releases()
updated = add_releases(releases, entries, commit)
if blob and updated == releases:
return libs_api(f"commits?path={RELEASES_FILE}&per_page=1")[0]["sha"]
return updated, libs_api(f"commits?path={RELEASES_FILE}&per_page=1")[0]["sha"]
body = {
"message": message,
"content": base64.b64encode(render_releases(updated).encode()).decode(),
@@ -667,7 +667,7 @@ def record_releases(entries: list[tuple[str, str]], commit: str) -> str:
**({"sha": blob} if blob else {}),
}
try:
return libs_api(f"contents/{RELEASES_FILE}", "PUT", body)["commit"]["sha"]
return updated, libs_api(f"contents/{RELEASES_FILE}", "PUT", body)["commit"]["sha"]
except urllib.error.HTTPError as e:
# 409 and 422: another writer changed or created the file since it was read
if e.code not in (409, 422) or attempt == RECORD_ATTEMPTS:
@@ -746,8 +746,7 @@ def claim_core(version: str, commit: str, branch: str) -> None:
return
if problem := types_problem(version, releases, branch):
sys.exit(problem)
libs_commit = record_releases([(core_key(branch), version)], commit)
releases, _ = read_releases()
releases, libs_commit = record_releases([(core_key(branch), version)], commit)
if recorded_core_commit(releases, version) == commit:
print("claim=new")
print(f"commit={libs_commit}")
@@ -894,7 +893,8 @@ def record(args: argparse.Namespace) -> None:
entries = [(key, version) for key, version in versions if version]
if not entries:
sys.exit("nothing to record")
print(record_releases(entries, args.commit))
_, libs_commit = record_releases(entries, args.commit)
print(libs_commit)
def test_names() -> None:
+7
View File
@@ -6,4 +6,11 @@ for dir in "$@"; do
if [ -d "$dir/build" ]; then
find "$dir/build" -mindepth 3 -maxdepth 3 -type d -name 'simplex-chat-*' ! -name "simplex-chat-$version" -exec rm -rf {} +
fi
for src in "$dir"/src/*/; do
[ -e "$src.git" ] || continue
rev=$(git -C "$src" rev-parse HEAD 2>/dev/null || true)
if [ -z "$rev" ] || ! grep -q "tag: $rev" cabal.project; then
rm -rf "$src"
fi
done
done
+1 -1
View File
@@ -15,7 +15,7 @@ while read -r p; do
if [ -n "$p" ]; then args+=(-m "$p"); fi
done <<< "${TESTS:-}"
if [ "${#args[@]}" -gt 0 ]; then
args+=(--fail-on=empty)
if [ "${ALLOW_EMPTY:-}" != true ]; then args+=(--fail-on=empty); fi
elif [ "${REDUCED:-}" = true ]; then
echo "No tests selected"
exit 0
+38 -16
View File
@@ -88,6 +88,10 @@ def listed_release(tag: str, assets: list[str], n: int, draft: bool = False, bod
return {"id": n, "tag_name": tag, "draft": draft, "body": body, **github_release(assets, n)}
def releases_file(releases: dict, blob: str) -> dict:
return {"content": base64.b64encode(render_releases(releases).encode()).decode(), "sha": blob}
def state(**overrides) -> State:
current = State(
libs_tag="core-1.0.0.1",
@@ -339,9 +343,6 @@ class ReleasesFileTest(unittest.TestCase):
class RecordReleasesTest(unittest.TestCase):
def file(self, releases, blob):
return {"content": base64.b64encode(render_releases(releases).encode()).decode(), "sha": blob}
def conflict(self):
error = urllib.error.HTTPError("url", 409, "Conflict", email.message.Message(), io.BytesIO())
self.addCleanup(error.close)
@@ -355,13 +356,13 @@ class RecordReleasesTest(unittest.TestCase):
return None if method == "GET" else {"commit": {"sha": "libs1"}}
with mock.patch.object(packages_release, "libs_api", api):
self.assertEqual(record_releases([("core", "7.1.0.12")], "sx1"), "libs1")
self.assertEqual(record_releases([("core", "7.1.0.12")], "sx1"), ({"core": {"7.1.0.12": "sx1"}}, "libs1"))
_, method, body = calls[1]
self.assertEqual((method, body["message"], "sha" in body), ("PUT", "core 7.1.0.12", False))
self.assertEqual(tomllib.loads(base64.b64decode(body["content"]).decode()), {"core": {"7.1.0.12": "sx1"}})
def test_retries_when_another_writer_changed_the_file(self):
reads = iter([self.file({"core": {"1": "a"}}, "blob1"), self.file({"core": {"1": "a", "2": "b"}}, "blob2")])
reads = iter([releases_file({"core": {"1": "a"}}, "blob1"), releases_file({"core": {"1": "a", "2": "b"}}, "blob2")])
puts = []
def api(path, method="GET", body=None):
@@ -372,21 +373,19 @@ class RecordReleasesTest(unittest.TestCase):
raise self.conflict()
return {"commit": {"sha": "libs2"}}
written = {"core": {"1": "a", "2": "b"}, "npm": {"simplex-chat": {"3": "sx3"}}}
with mock.patch.object(packages_release, "libs_api", api):
self.assertEqual(record_releases([("npm/simplex-chat", "3")], "sx3"), "libs2")
self.assertEqual(record_releases([("npm/simplex-chat", "3")], "sx3"), (written, "libs2"))
self.assertEqual([body["sha"] for body in puts], ["blob1", "blob2"])
self.assertEqual(
tomllib.loads(base64.b64decode(puts[1]["content"]).decode()),
{"core": {"1": "a", "2": "b"}, "npm": {"simplex-chat": {"3": "sx3"}}},
)
self.assertEqual(tomllib.loads(base64.b64decode(puts[1]["content"]).decode()), written)
def test_recorded_entries_return_the_last_commit_of_the_file(self):
def api(path, method="GET", body=None):
self.assertEqual(method, "GET")
return [{"sha": "libs0"}] if path.startswith("commits") else self.file({"core": {"1": "a"}}, "blob1")
return [{"sha": "libs0"}] if path.startswith("commits") else releases_file({"core": {"1": "a"}}, "blob1")
with mock.patch.object(packages_release, "libs_api", api):
self.assertEqual(record_releases([("core", "1")], "other"), "libs0")
self.assertEqual(record_releases([("core", "1")], "other"), ({"core": {"1": "a"}}, "libs0"))
class GitRepoTest(unittest.TestCase):
@@ -640,7 +639,7 @@ class PackageStateTest(GitRepoTest):
with (
mock.patch.object(packages_release, "ROOT", self.repo),
mock.patch.object(packages_release, "python_project", return_value="simplex-chat"),
mock.patch.object(packages_release, "record_releases", return_value="libs1") as record,
mock.patch.object(packages_release, "record_releases", return_value=({}, "libs1")) as record,
contextlib.redirect_stdout(io.StringIO()),
):
packages_release.main(["record", "--commit", "sx1", "--mcp", "0.2.0"])
@@ -786,11 +785,10 @@ class PublishReleaseTest(unittest.TestCase):
class ClaimCoreTest(unittest.TestCase):
def claim(self, recorded, after_record=None, problem=None, version="7.1.0.12", branch="master"):
reads = iter([(recorded, "blob"), (after_record or recorded, "blob")])
self.record = mock.Mock(return_value="libs1")
self.record = mock.Mock(return_value=(after_record or recorded, "libs1"))
output = io.StringIO()
with (
mock.patch.object(packages_release, "read_releases", lambda: next(reads)),
mock.patch.object(packages_release, "read_releases", return_value=(recorded, "blob")),
mock.patch.object(packages_release, "record_releases", self.record),
mock.patch.object(packages_release, "types_problem", return_value=problem),
contextlib.redirect_stdout(output),
@@ -836,6 +834,30 @@ class ClaimCoreTest(unittest.TestCase):
claimed = {"core": {"master": {"7.1.0.11": "sx0", "7.1.0.12": "sx2"}}}
self.assertEqual(self.claim({"core": {"master": {"7.1.0.11": "sx0"}}}, claimed), ["claim=skip"])
def test_written_claim_is_new_when_reads_return_the_previous_file(self):
previous = {"core": {"master": {"7.1.0.11": "sx0"}}}
puts = []
def api(path, method="GET", body=None):
if method == "GET":
return releases_file(previous, "blob1")
puts.append(body)
return {"commit": {"sha": "libs1"}}
output = io.StringIO()
with (
mock.patch.object(packages_release, "libs_api", api),
mock.patch.object(packages_release, "types_problem", return_value=None),
contextlib.redirect_stdout(output),
):
claim_core("7.1.0.12", "sx1", "master")
self.assertEqual(output.getvalue().splitlines(), ["claim=new", "commit=libs1"])
self.assertEqual([body["sha"] for body in puts], ["blob1"])
self.assertEqual(
tomllib.loads(base64.b64decode(puts[0]["content"]).decode()),
{"core": {"master": {"7.1.0.11": "sx0", "7.1.0.12": "sx1"}}},
)
class TypesProblemTest(unittest.TestCase):
def problem(self, types, changed=True, published=False, releases=None):
+2 -2
View File
@@ -1,8 +1,8 @@
{
"https://github.com/simplex-chat/simplexmq.git"."dc118d3bcc7512398e55a1c7d7dbf87458ba0a61" = "1cljmrl67z5khxn5jdp8p8gc9q3mxa8jp6mnfxhz4w7lf9g1i4di";
"https://github.com/simplex-chat/simplexmq.git"."d38bcf50131d59f027d170731e4ea22031650611" = "1qd18bqg6zji5s6rcaw63rdbyj82sc5jn1apfq2pbkxs9cybwjyy";
"https://github.com/simplex-chat/hs-socks.git"."a30cc7a79a08d8108316094f8f2f82a0c5e1ac51" = "0yasvnr7g91k76mjkamvzab2kvlb1g5pspjyjn2fr6v83swjhj38";
"https://github.com/simplex-chat/direct-sqlcipher.git"."2330df3dc8c4b660674d3c02d76bb86f66c2abee" = "11pfj1vqsjdl26nplkr2l6z1xj7cn153qijj5gknmlzq3krn7x1i";
"https://github.com/simplex-chat/sqlcipher-simple.git"."a46bd361a19376c5211f1058908fc0ae6bf42446" = "1z0r78d8f0812kxbgsm735qf6xx8lvaz27k1a0b4a2m0sshpd5gl";
"https://github.com/simplex-chat/sqlcipher-simple.git"."6bf2796de625dca678c70e98560010c6ec7ed635" = "0mgkm2d6c4vsv689niy2fi0q58pk13mpvm4idzmn0vhwyi2wmv1g";
"https://github.com/simplex-chat/aeson.git"."aab7b5a14d6c5ea64c64dcaee418de1bb00dcc2b" = "0jz7kda8gai893vyvj96fy962ncv8dcsx71fbddyy8zrvc88jfrr";
"https://github.com/simplex-chat/haskell-terminal.git"."f708b00009b54890172068f168bf98508ffcd495" = "0zmq7lmfsk8m340g47g5963yba7i88n4afa6z93sg9px5jv1mijj";
"https://github.com/simplex-chat/android-support.git"."9aa09f148089d6752ce563b14c2df1895718d806" = "0pbf2pf13v2kjzi397nr13f1h3jv0imvsq8rpiyy2qyx5vd50pqn";
+1
View File
@@ -70,6 +70,7 @@ for os_pair in ${oses}; do
--device /dev/fuse \
--cap-add SYS_ADMIN \
--security-opt apparmor:unconfined \
-e CABAL_DIR=/home/builder/.cabal \
-v "${tempdir}/${repo_name}:/project" \
"${image_name}"