Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pulling in latest commits from upstream master #37

Merged
merged 33 commits into from
Feb 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
1e1b189
Remove py3.7 (#234)
yurushao Jun 9, 2023
6f02f6e
Bump cryptography from 39.0.2 to 41.0.1 (#260)
dependabot[bot] Jun 9, 2023
013c0d1
Bump tox from 3.25.0 to 4.6.0 (#262)
dependabot[bot] Jun 9, 2023
95f5c35
Bump fakeredis from 1.7.5 to 2.14.1 (#263)
dependabot[bot] Jun 9, 2023
147bdf3
Bump flask from 2.1.2 to 2.3.2 (#250)
dependabot[bot] Jun 9, 2023
6fec10e
Bump pytest from 7.1.2 to 7.3.1 (#243)
dependabot[bot] Jun 9, 2023
a34aaf8
Bump redis from 4.5.3 to 4.5.5 (#253)
dependabot[bot] Jun 9, 2023
5725b0d
Bump coverage from 6.4.1 to 7.2.7 (#267)
dependabot[bot] Jun 12, 2023
4c118cf
Bump pytest-cov from 3.0.0 to 4.1.0 (#266)
dependabot[bot] Jun 12, 2023
9d68d6b
Bump actions/checkout from 3 to 4 (#282)
dependabot[bot] Sep 25, 2023
31ae18d
[Snyk] Security upgrade cryptography from 41.0.1 to 41.0.4 (#284)
devinlundberg Sep 25, 2023
f3edccd
Bump tox from 4.6.0 to 4.11.3 (#287)
dependabot[bot] Sep 26, 2023
03bf76f
Bump fakeredis from 2.14.1 to 2.20.0
dependabot[bot] Oct 23, 2023
c4d6074
Merge pull request #292 from pinterest/dependabot/pip/fakeredis-2.20.0
xia0pin9 Oct 23, 2023
1a9824d
Bump redis from 4.5.5 to 5.0.1
dependabot[bot] Oct 23, 2023
6a10fd3
Merge pull request #289 from pinterest/dependabot/pip/redis-5.0.1
xia0pin9 Oct 23, 2023
99028bf
Install deps from requirements.txt (#303)
yurushao Dec 1, 2023
baa921f
Prepare 1.6.1 release (#304)
yurushao Dec 2, 2023
8103cb4
Bump version: 1.6.0 → 1.6.1 (#305)
yurushao Dec 2, 2023
ae27473
Use urllib.parse for quoting/unquoting plus instead of deprecated wer…
vin01 Dec 2, 2023
fd27ab7
Bump actions/setup-python from 4 to 5 (#306)
dependabot[bot] Dec 22, 2023
b53ceed
Bump github/codeql-action from 2 to 3 (#309)
dependabot[bot] Dec 22, 2023
b66b1e1
Bump werkzeug from 2.3.3 to 3.0.1 (#295)
dependabot[bot] Dec 22, 2023
7db0be7
Bump flask from 2.3.2 to 3.0.0 (#294)
dependabot[bot] Dec 22, 2023
3871c39
Bump pytest from 7.3.1 to 7.4.4
dependabot[bot] Jan 1, 2024
a8e4312
Bump version: 1.6.1 → 1.6.2 (#311)
yurushao Jan 3, 2024
29ce62b
Merge pull request #314 from pinterest/dependabot/pip/pytest-7.4.4
xia0pin9 Jan 3, 2024
6798a26
Bump freezegun from 1.2.1 to 1.4.0
dependabot[bot] Jan 3, 2024
564a29d
Merge pull request #312 from pinterest/dependabot/pip/freezegun-1.4.0
xia0pin9 Jan 3, 2024
d8c05a9
Bump flake8 from 6.0.0 to 7.0.0
dependabot[bot] Jan 5, 2024
74ded41
Merge pull request #315 from pinterest/dependabot/pip/flake8-7.0.0
xia0pin9 Jan 5, 2024
455db36
Add health check endpoint (#329)
yurushao Feb 3, 2024
170f1d3
Merge branch 'master' of https://github.com/pinterest/snappass into l…
silverl Feb 6, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dev-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
coverage==7.2.7
fakeredis==2.20.0
flake8==6.0.0
flake8==7.0.0
freezegun==1.4.0
pytest==7.4.4
pytest-cov==4.1.0
Expand Down
6 changes: 6 additions & 0 deletions snappass/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,12 @@ def show_password(password_key):
return render_template('password.html', password=password)


@app.route('/_/_/health', methods=['GET'])
@check_redis_alive
def health_check():
return {}


@check_redis_alive
def main():
app.run(host='0.0.0.0')
Expand Down
5 changes: 5 additions & 0 deletions tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,11 @@ def setUp(self):
snappass.app.config['TESTING'] = True
self.app = snappass.app.test_client()

def test_health_check(self):
response = self.app.get('/_/_/health')
self.assertEqual('200 OK', response.status)
self.assertEqual('{}', response.get_data(as_text=True).strip())

def test_preview_password(self):
password = "I like novelty kitten statues!"
key = snappass.set_password(password, 30)
Expand Down
Loading