Skip to content

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

Open
pandafy wants to merge 10 commits intomasterfrom
updated-multitenant-tests
Open

[tests] Added multi-tentant tests for shared objects#1024
pandafy wants to merge 10 commits intomasterfrom
updated-multitenant-tests

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
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.

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

coveralls commented Jun 4, 2025

Coverage Status

coverage: 98.793% (+0.05%) from 98.746%
when pulling 8c9efc8 on updated-multitenant-tests
into 4ea68be on master.

@pandafy pandafy force-pushed the updated-multitenant-tests branch from c46269f to 2a4a863 Compare July 4, 2025 13:57
@nemesifier nemesifier moved this to In progress in 25.09 Release Sep 3, 2025
@nemesifier nemesifier moved this from In progress to Backlog in 25.09 Release Sep 12, 2025
@nemesifier
Copy link
Member

@coderabbitai review

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 20, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 20, 2026

Warning

Rate limit exceeded

@nemesifier has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 28 minutes and 45 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 1ee8c25 and 8c9efc8.

📒 Files selected for processing (16)
  • .github/workflows/ci.yml
  • openwisp_controller/config/migrations/0061_update_groups_permissions.py
  • openwisp_controller/config/migrations/__init__.py
  • openwisp_controller/config/tests/test_admin.py
  • openwisp_controller/config/tests/test_api.py
  • openwisp_controller/connection/base/models.py
  • openwisp_controller/connection/tests/test_admin.py
  • openwisp_controller/connection/tests/test_api.py
  • openwisp_controller/geo/migrations/0004_update_groups_permissions.py
  • openwisp_controller/geo/migrations/__init__.py
  • openwisp_controller/pki/api/serializers.py
  • openwisp_controller/pki/base/models.py
  • openwisp_controller/pki/migrations/0012_update_group_permissions.py
  • openwisp_controller/pki/migrations/__init__.py
  • openwisp_controller/pki/tests/test_admin.py
  • openwisp_controller/pki/tests/test_api.py

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-project-automation github-project-automation bot moved this from Backlog to In progress in 26.05 Release Jan 20, 2026
pandafy added a commit that referenced this pull request Mar 17, 2026
The tasks._is_update_in_progress function will exclude the current
task from the check.

Fixes #1024

Co-authored-by: Piyush Bafna <130243298+piyushdev04@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: In progress
Status: In progress

Development

Successfully merging this pull request may close these issues.

3 participants