-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fix minor version comparison * feditest version to only print the version, so it can be used in git checkout * Consistent description of the project * Update project version * Make HTML report titles and H1's consistent * Minor CSS * Now called session_template not session; update Jinja2 template * Better formatting of SpecLevel and InteropLevel in HTML * To trigger CORS headers, the Origin header sent from the client must have a URI method * Rename WebFingerQueryResponse -> WebFingerQueryDiagResponse * Simplify multiple exceptions in WebFingerQueryDiagResponse * Simplify ignoring exceptions of certain types in WebFinger tests so each test doesn't report other tests' exceptions * Updating RELEASE-HOWTO --------- Co-authored-by: Johannes Ernst <[email protected]>
- Loading branch information
Showing
15 changed files
with
95 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,69 +1,89 @@ | ||
# Release How-To | ||
|
||
## Merge | ||
|
||
1. Repo `feditest`: merge `develop` into `main` | ||
1. Repo `feditest-tests-fediverse`: merge `develop` into `main` | ||
1. Repo `feditest-tests-sandbox`: merge `develop` into `main` | ||
|
||
## Smoke test and test with sandbox | ||
|
||
1. On the Mac: | ||
1. Repo `feditest`: `git checkout main` | ||
1. Repo `feditest`: `git checkout develop` | ||
1. In `pyproject.toml`, change `project` / `version` to the new version `VERSION` (needed so the generated files have the right version in them before check-in) | ||
1. Clean rebuild: | ||
1. `rm -rf venv.*` | ||
1. `make venv PYTHON=python3.11` | ||
1. `make venv` | ||
1. `make lint`: ruff and mypy show no errors | ||
1. `make` | ||
1. Repo `feditest-tests-sandbox`: `git checkout main` | ||
1. `make tests`: unit tests show no errors (smoke tests don't run on macOS) | ||
1. Repo `feditest-tests-sandbox`: `git checkout develop` | ||
1. Clean re-run and report generation of the sandbox tests: | ||
1. `make -f Makefile.generate clean FEDITEST=../feditest/venv.darwin.main/bin/feditest` | ||
1. `make -f Makefile.run clean FEDITEST=../feditest/venv.darwin.main/bin/feditest` | ||
1. `make -f Makefile.generate examples FEDITEST=../feditest/venv.darwin.main/bin/feditest` | ||
1. `make -f Makefile.run sandbox FEDITEST=../feditest/venv.darwin.main/bin/feditest` | ||
1. `make -f Makefile.create clean FEDITEST=../feditest/venv.darwin.default/bin/feditest` | ||
1. `make -f Makefile.run clean FEDITEST=../feditest/venv.darwin.default/bin/feditest` | ||
1. `make -f Makefile.create examples FEDITEST=../feditest/venv.darwin.default/bin/feditest` | ||
1. `make -f Makefile.run sandbox FEDITEST=../feditest/venv.darwin.default/bin/feditest` | ||
1. `open examples/testresults/*.html` and check for plausbility of reports | ||
|
||
## Smoke test and test quickstart | ||
|
||
1. On UBOS: | ||
1. Repo `feditest`: `git checkout main` | ||
1. Repo `feditest`: `git checkout develop` | ||
1. Clean rebuild: | ||
1. `rm -rf venv.*` | ||
1. `make` | ||
1. Repo `feditest-tests-fediverse`: `git checkout main` | ||
1. `rm -rf venv.*` | ||
1. `make venv` | ||
1. `make lint`: ruff and mypy show no errors | ||
1. `make tests`: unit tests and smoke tests show no errors | ||
1. Repo `feditest-tests-fediverse`: `git checkout develop` | ||
1. Clean re-run and report generation of the sandbox tests: | ||
1. `make -f Makefile.generate clean FEDITEST=../feditest/venv.linux.main/bin/feditest` | ||
1. `make -f Makefile.create clean FEDITEST=../feditest/venv.linux.main/bin/feditest` | ||
1. `make -f Makefile.run clean FEDITEST=../feditest/venv.linux.main/bin/feditest` | ||
1. `make -f Makefile.generate examples FEDITEST=../feditest/venv.linux.main/bin/feditest` | ||
1. `make -f Makefile.create examples FEDITEST=../feditest/venv.linux.main/bin/feditest` | ||
1. `make -f Makefile.run examples FEDITEST=../feditest/venv.linux.main/bin/feditest` | ||
1. `xdg-open examples/testresults/*.html` and check for plausbility of reports | ||
|
||
## Tag versions | ||
|
||
1. On the Mac: | ||
1. Update repo `feditest-tests-fediverse` | ||
1. `git commit` to `main` | ||
1. Update repo `feditest-tests-fediverse`, branch `develop`: | ||
1. `git tag -a vVERSION -m vVERSION` | ||
1. `git push` | ||
1. `git push --tags` | ||
1. Update repo `feditest-tests-sandbox` | ||
1. `git commit` to `main` | ||
1. Update repo `feditest-tests-sandbox`, branch `develop`: | ||
1. `git tag -a vVERSION -m vVERSION` | ||
1. `git push` | ||
1. `git push --tags` | ||
1. Update repo `feditest`: | ||
1. Change the `python-version` value in `pyproject.toml` to the "production value" that permits Python 3.11 and greater | ||
1. Update repo `feditest`, branch `develop`: | ||
1. `git commit` to `main` | ||
1. `git tag -a vVERSION -m vVERSION` | ||
1. `git push` | ||
1. `git push --tags` | ||
1. Release to PyPi | ||
1. `make release PYTHON=python3.11` | ||
1. `venv.release/bin/twine upload dist/*` | ||
1. `pip install --upgrade feditest` | ||
1. `feditest version` now shows `VERSION` | ||
1. Return `python-version` value in `pyproject.toml` to the "development value" that only permits Python 3.11 | ||
|
||
## Merge into main | ||
|
||
1. Repo `feditest-tests-fediverse`: pull request `develop` into `main` | ||
1. Repo `feditest-tests-sandbox`: pull request `develop` into `main` | ||
1. Repo `feditest`: pull request `develop` into `main` | ||
1. Approve all three pull requests | ||
|
||
## Publish to PyPi | ||
|
||
1. On the Mac: | ||
1. `make release` | ||
1. `venv.release/bin/twine upload dist/*` | ||
1. `pip install --upgrade feditest` | ||
1. `feditest version` now shows `VERSION` | ||
|
||
## Publish to UBOS repos | ||
|
||
1. On UBOS: | ||
1. Build `feditest` for the UBOS package repos so it can be installed with `pacman -S feditest` | ||
|
||
1. Release notes: | ||
1. Repo: `feditest.org`: create release notes | ||
1. `git push` | ||
## Create release notes | ||
|
||
1. Repo: `feditest.org`: create release notes | ||
1. `git push` | ||
|
||
## Announce | ||
|
||
1. Announce: | ||
1. `@[email protected]`: post link to release notes | ||
1. `https://matrix.to/#/#fediverse-testing:matrix.org`: post link to release notes | ||
1. `https://matrix.to/#/#fediverse-testing:matrix.org`: post link to release notes | ||
1. `@[email protected]`: post link to release notes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ build-backend = "hatchling.build" | |
|
||
[project] | ||
name = "feditest" | ||
version = "0.3" | ||
version = "0.4" | ||
authors = [ | ||
{ name="Johannes Ernst", email="[email protected]" }, | ||
{ name="Steve Bate", email="[email protected]" } | ||
|
@@ -27,7 +27,7 @@ dependencies = [ | |
"types-requests", | ||
"pre-commit" | ||
] | ||
description = "Testing federated protocols" | ||
description = "Test framework to test distributed, heterogeneous systems with complex protocols such as the Fediverse" | ||
readme = "README-PyPI.md" | ||
|
||
# We develop on 3.11, so we can support debian 12 (including Raspberry PI OS) systems, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
""" | ||
|
||
import json | ||
from dataclasses import dataclass | ||
from dataclasses import dataclass, field | ||
from typing import Any | ||
|
||
from feditest.nodedrivers import NotImplementedByNodeError | ||
|
@@ -471,10 +471,24 @@ def __str__(self): | |
|
||
|
||
@dataclass | ||
class WebFingerQueryResponse: | ||
class WebFingerQueryDiagResponse: | ||
http_request_response_pair: HttpRequestResponsePair | ||
jrd : ClaimedJrd | None # This may be an invalid jrd | ||
exc : Exception | None # | ||
exceptions : list[Exception] = field(default_factory=list) # List of all things that were found to be wrong | ||
|
||
|
||
def exceptions_of_type(self, filter_by: type) -> list[Exception]: | ||
""" | ||
Return only the subset of exceptions that are of type filter_by | ||
""" | ||
return [ ex for ex in self.exceptions if isinstance(ex, filter_by) ] | ||
|
||
|
||
def not_exceptions_of_type(self, filter_by: tuple) -> list[Exception]: | ||
""" | ||
Return only the subset of exceptions that are not of any of the types in filter_by | ||
""" | ||
return [ ex for ex in self.exceptions if not isinstance(ex, filter_by) ] | ||
|
||
|
||
class WebFingerDiagClient(WebFingerClient, WebDiagClient): | ||
|
@@ -491,7 +505,7 @@ def diag_perform_webfinger_query( | |
resource_uri: str, | ||
rels: list[str] | None = None, | ||
server: WebFingerServer | None = None | ||
) -> WebFingerQueryResponse: | ||
) -> WebFingerQueryDiagResponse: | ||
""" | ||
Make this Node perform a WebFinger query for the provided resource_uri. | ||
The resource_uri must be a valid, absolute URI, such as 'acct:[email protected]` or | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -167,7 +167,6 @@ div.feditest.session > h3::before { | |
} | ||
|
||
.feditest .status div { | ||
margin: 3px 6px; | ||
padding: 5px; | ||
} | ||
|
||
|