Skip to content

[tests] Added multi-tentant tests for shared objects #1024

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

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

pandafy
Copy link
Member

@pandafy pandafy commented May 9, 2025

Checklist

  • I have read the OpenWISP Contributing Guidelines.
  • I have manually tested the changes proposed in this pull request.
  • I have written new test cases for new code and/or updated existing tests for changes to existing code.
  • I have updated the documentation.

Blockers

@pandafy pandafy moved this from To do (general) to In progress in OpenWISP Contributor's Board May 9, 2025
@pandafy pandafy force-pushed the updated-multitenant-tests branch 2 times, most recently from 3bcabf0 to 2d4afea Compare May 22, 2025 07:42
@@ -75,6 +75,7 @@ jobs:
pip install -U pip wheel setuptools
pip install -U -r requirements-test.txt
pip install -U -e .
pip install -UI "openwisp-users @ https://github.com/openwisp/openwisp-users/tarball/issues/238-view-shared-objects"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO: Remove before merging

Copy link
Member

@nemesifier nemesifier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried accessing shared objects via REST API and this is what I found:

  • Ok:
    • Device, Vpn, Credential, IPAM subnet
  • Not ok:
    • Template: 403
    • Ca: 403
    • Cert: 403
    • Ip address list of a shared subnet, I get 404, eg: /api/v1/ipam/subnet/{pkl}/ip-address/

When using the admin it becomes evident that we'll need to work on #848 next.

@pandafy pandafy force-pushed the updated-multitenant-tests branch from b136c1f to 46c0821 Compare June 4, 2025 14:33
@pandafy pandafy force-pushed the updated-multitenant-tests branch from 46c0821 to c46269f Compare June 4, 2025 14:41
@@ -76,6 +76,7 @@ jobs:
pip install -U pip wheel setuptools
pip install -U -r requirements-test.txt
pip install -U -e .
pip install -UI "openwisp-users @ https://github.com/openwisp/openwisp-users/tarball/issues/238-view-shared-objects" "cryptography~=43.0.3"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Upgrading openwisp-users was installing the latest version of cryptography which is incompatible with django-x509. Thus, pinning the dependency here fixed the CI build.

@coveralls
Copy link

Coverage Status

coverage: 98.832% (+0.02%) from 98.816%
when pulling c46269f on updated-multitenant-tests
into 85eee35 on master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: In progress
Development

Successfully merging this pull request may close these issues.

3 participants