Skip to content

Instantly share code, notes, and snippets.

View sssoleileraaa's full-sized avatar

sssoleileraaa

View GitHub Profile
@sssoleileraaa
sssoleileraaa / dev-requirements-in.patch
Last active January 20, 2022 02:21
Ubuntu 18 developer requirements for SecureDrop Client
# 1. run `python3 -m venv .venv`
# 2. run `.venv/bin/pip install --upgrade pip wheel`
# 3. run `source .venv/bin/activate`
# 4. run `pip install -r requirements/requirements.in
# 5. run `wget https://gist.githubusercontent.com/creviera/d87a910c39ef49a48be05fd30e30b72e/raw/1d3ebfe13eebaf0ab95cd45414cafa417883072c/dev-requirements-in.patch`
# 6. run `git apply dev-requirements-in.patch`
# 7. run `pip install -r requirements/dev-requirements.in`
diff --git a/requirements/dev-requirements.in b/requirements/dev-requirements.in
index 83929f0..7915cd5 100644
--- a/requirements/dev-requirements.in
@sssoleileraaa
sssoleileraaa / gist:8ed991737752a35785033ceac903d878
Created September 29, 2021 20:40
slow down deletion of conversation
diff --git a/securedrop_client/api_jobs/sources.py b/securedrop_client/api_jobs/sources.py
index b1e4e81..1f2dfa7 100644
--- a/securedrop_client/api_jobs/sources.py
+++ b/securedrop_client/api_jobs/sources.py
@@ -47,6 +47,8 @@ class DeleteConversationJob(ApiJob):
"""
try:
api_client.delete_conversation(uuid=self.uuid)
+ import time
+ time.sleep(5)
@sssoleileraaa
sssoleileraaa / securedrop-dev-packages-lfs_pull-123_review.markdown
Created August 30, 2021 18:36
Review for securedrop-dev-packages-lfs#123

✔️ Removed files in core/focal looks fine:

Details...
user@dev » git diff main..prune-packages-2021-08-30 -- core/focal
diff --git a/core/focal/linux-headers-4.14.188-grsec-securedrop_4.14.188-grsec-securedrop-1_amd64.deb b/core/focal/linux-headers-4.14.188-grsec-securedrop_4.14.188-grsec-securedrop-1_amd64.deb
deleted file mode 100644
index bf39aafc..00000000
diff --git a/securedrop_client/api_jobs/uploads.py b/securedrop_client/api_jobs/uploads.py
index 4ce61c9..5e06f8c 100644
--- a/securedrop_client/api_jobs/uploads.py
+++ b/securedrop_client/api_jobs/uploads.py
@@ -31,6 +31,7 @@ class SendReplyJob(SingleObjectApiJob):
"""
try:
+ raise Exception('testing error state for reply badges')
# If the reply has already made it to the server but we didn't get a 201 response back,
diff --git a/dom0/fpf-apt-test-repo.sls b/dom0/fpf-apt-test-repo.sls
index 6299198..1ef3f75 100644
--- a/dom0/fpf-apt-test-repo.sls
+++ b/dom0/fpf-apt-test-repo.sls
@@ -42,3 +42,11 @@ install-securedrop-keyring-package:
- securedrop-keyring
- require:
- pkgrepo: configure-apt-test-apt-repo
+
+test-updated-securedrop-config-package:
@sssoleileraaa
sssoleileraaa / cassette-generation.patch
Created September 3, 2020 22:19
This is the patch to apply before regenerating new cassettes used by functional tests in the securedrop-client
user@dev:~/src/securedrop$ git diff
diff --git a/securedrop/models.py b/securedrop/models.py
index ad991e6c3..1c954b9a6 100644
--- a/securedrop/models.py
+++ b/securedrop/models.py
@@ -658,6 +658,7 @@ class Journalist(db.Model):
try:
user = Journalist.query.filter_by(username=username).one()
+ return user