-
Notifications
You must be signed in to change notification settings - Fork 8
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
DIG-1836: fix snyk vulnerabilities #904
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried out fresh rebulid and everything worked well, all integration tests passed, although on the first run, some htsget tests failed. A secondary run had them all passing.
when I tried using the provided way to pytest in authx repo, I get an assertion error:
(candig) marionshadbolt@Marions-Air candigv2-authx % source ../CanDIGv2/env.sh
(candig) marionshadbolt@Marions-Air candigv2-authx % pytest
======================================= test session starts ========================================
platform darwin -- Python 3.12.8, pytest-8.3.3, pluggy-1.5.0
rootdir: /Users/marionshadbolt/Documents/GitHub/candigv2-authx
configfile: pyproject.toml
plugins: Faker-33.1.0, cov-2.7.1, anyio-4.7.0, requests-mock-1.12.1
collected 11 items
test_auth.py ..F........ [100%]
============================================= FAILURES =============================================
_________________________________________ test_user_email __________________________________________
def test_user_email():
"""
If OPA is present, check to see that the user's email is returned.
"""
if OPA_URL is not None:
> assert authx.auth.get_user_email(FakeRequest(site_admin=True), opa_url=OPA_URL, admin_secret=OPA_SECRET) == f"{SITE_ADMIN_USER}@test.ca"
E AssertionError: assert '[email protected]' == '[email protected]@test.ca'
E
E - [email protected]@test.ca
E ? --------
E + [email protected]
test_auth.py:100: AssertionError
========================================= warnings summary =========================================
test_auth.py::test_put_aws_credential
/Users/marionshadbolt/Documents/GitHub/candigv2-authx/test_auth.py:165: UserWarning: aws credential tests can only be run within the candig-ingest container
warnings.warn(UserWarning("aws credential tests can only be run within the candig-ingest container"))
test_auth.py::test_get_s3_url
/Users/marionshadbolt/Documents/GitHub/candigv2-authx/test_auth.py:208: UserWarning: MINIO_URL is not set
warnings.warn(UserWarning("MINIO_URL is not set"))
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
===================================== short test summary info ======================================
FAILED test_auth.py::test_user_email - AssertionError: assert '[email protected]' == '[email protected]@test.ca'
Did you re-run pip install?
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
worked after updating my local authx
This passes
snyk test
on my local machine now.I added some env vars to env.sh so that if you want to run the pytest for candigv2-authx, you can do so from that directory, as long as you're in the candig conda env: