-
-
Notifications
You must be signed in to change notification settings - Fork 249
Tests for device config updates on org variable changes #1172
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
base: master
Are you sure you want to change the base?
Tests for device config updates on org variable changes #1172
Conversation
bcc1026 to
e7f3bcb
Compare
|
@coderabbitai review Sorry @ssmadhavan006 we've been flooded with PRs lately and it's taking time to respond to everyone. Instead of sharing screenshots in this case a video recording demonstrating the solution would have been better. |
|
✅ Actions performedReview triggered.
|
📝 WalkthroughWalkthroughThis pull request adds a new test class Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
📜 Recent review detailsConfiguration used: Organization UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🔇 Additional comments (4)
✏️ Tip: You can disable this entire section by setting 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. Comment |
nemesifier
left a comment
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 only see a test here, but no solution, is this on purpose? Waiting for the CI build, I assume you worked on replicating the bug in the tests and I expect this test to fail, let's see.
Checklist
Reference to Existing Issue
Closes #1070.
Description of Changes
This PR adds missing automated tests to ensure device configuration status updates correctly when organization configuration variables (context) change. The existing implementation already handled this logic correctly (via checksum comparison) but there was no automated test coverage verifying the behavior.
What’s Added
A new test class
TestOrganizationConfigUpdatesinopenwisp_controller/config/tests/test_device.py. It includes three scenarios:Affected device becomes
modified{{ ssid }}Unaffected device remains
appliedNo status change when checksum does not change
Notes:
Screenshot
Creating a Organization

Creating a Template-1


Creating a Template-2


Device-1 Configuration

Device-2 Configuration

Before Change

Change Org Variable

Device Status Change
