Dismantle REST API #55
No reviewers
Labels
No Label
Bug
Contributions welcome
Did not do
Duplicate
Feature
Module
Backups
Module
GraphQL
Priority
High
Priority
Low
Priority
Medium
Refactor
Severity
High
Severity
Low
Severity
Medium
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: SelfPrivacy/selfprivacy-rest-api#55
Loading…
Reference in New Issue
There is no content yet.
Delete Branch "remove-rest"
Deleting a branch is permanent. Although the deleted branch may exist for a short time before cleaning up, in most cases it CANNOT be undone. Continue?
Triggered by: CI having problems with TestClient as used in REST testing.
How do we do it:
For adding tests to be efficient, one wants #40 to merge first, ideally.
81ed0aae75
tob49343555b
@ -16,3 +18,4 @@
from selfprivacy_api.jobs import Jobs, JobStatus, Job
SNAPSHOT_CACHE_TTL_HOURS = 6
Duplicate constant declaration
addressed
@ -167,3 +179,1 @@
service=service_to_graphql_service(service),
job=job_to_api_job(job),
)
if job.status == JobStatus.FINISHED:
I think that it is likely that this will return 400 all the time. It should return the message like "Started moving the service".
It is not an async call, just a very long one. It returns when it is either finished or failed.
added more handlers
@ -170,2 +170,4 @@
def get_dkim_key(domain: str, parse: bool = True) -> typing.Optional[str]:
"""Get DKIM key from /var/dkim/<domain>.selector.txt"""
if os.path.exists("/var/dkim/" + domain + ".selector.txt"):
# Is this really neccessary to use Popen here?
No, looks like a leftover that can be refactored.
@ -8,0 +21,4 @@
TESTFILE_2_BODY = "testissimo!"
@pytest.fixture()
These fixtures are unused in this file. Maybe they should be in
conftest.py
?@ -0,0 +91,4 @@
###############################################################################
def test_dkim_key(authorized_client, mock_subproccess_popen):
...I wonder how did we end up with
dkim
in these tests?These are clearly not related to DKIM anymore. File should be renamed too.
5e2757e38e
to2b21df9ad3
WIP: Dismantle REST APIto Dismantle REST API@inex I think this one is ready.
but there is an unrelated error in CI, will work on it separately.
LGTM.
Do not merge yet.@ -37,6 +38,7 @@ migrations = [
MigrateToSelfprivacyChannelFrom2205(),
MigrateToSelfprivacyChannelFrom2211(),
LoadTokensToRedis(),
CreateModulesField(),
Not needed, 3.0.0 will run on the system which already has a new userdata structure. I will make an additional PR to account for changes occurred during migration.