-
Notifications
You must be signed in to change notification settings - Fork 638
UN-3636 [MISC] Merge overlay manifests via UNSTRACT_RIG_EXTRA_MANIFESTS #2188
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
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
16f31ce
UN-3636 [FEAT] Merge overlay manifests via UNSTRACT_RIG_EXTRA_MANIFESTS
chandrasekharan-zipstack b6da5a6
UN-3636 [FIX] Skip org lookup when no org in context
chandrasekharan-zipstack d48d1dc
UN-3636 [FIX] Scope overlay manifests to the default manifest
chandrasekharan-zipstack 793b32f
UN-3636 [FIX] Stop re-running cross-tier deps in every tier leg
chandrasekharan-zipstack da2a5ce
UN-3636 [MISC] Drop the ENVIRONMENT gate on the LLM mock (#2191)
chandrasekharan-zipstack df3c514
Merge branch 'main' into feat/rig-extra-manifests
chandrasekharan-zipstack d23587d
UN-3636 [MISC] Tighten code comments
chandrasekharan-zipstack 8d1442d
UN-3636 [FIX] Gate overlay merging on an omitted path, not its value
chandrasekharan-zipstack ecc64b9
UN-3636 [FIX] Stop ide_prompt_complete tests from hitting the network
chandrasekharan-zipstack File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| """Regression tests for UserContext.get_organization. | ||
|
|
||
| Pins the no-org short-circuit: the lookup must return None without touching the | ||
| DB, so it stays evaluable on a DB-less/unmigrated setup. | ||
| """ | ||
|
|
||
| from __future__ import annotations | ||
|
|
||
| from unittest.mock import patch | ||
|
|
||
| from utils.user_context import UserContext | ||
|
|
||
|
|
||
| class TestGetOrganizationNoContext: | ||
| def test_returns_none_without_hitting_db(self): | ||
| with ( | ||
| patch("utils.user_context.StateStore.get", return_value=None), | ||
| patch("utils.user_context.Organization.objects.get") as mock_get, | ||
| ): | ||
| assert UserContext.get_organization() is None | ||
| mock_get.assert_not_called() | ||
|
|
||
| def test_empty_identifier_short_circuits(self): | ||
| with ( | ||
| patch("utils.user_context.StateStore.get", return_value=""), | ||
| patch("utils.user_context.Organization.objects.get") as mock_get, | ||
| ): | ||
| assert UserContext.get_organization() is None | ||
| mock_get.assert_not_called() | ||
|
|
||
| def test_identifier_present_looks_up_organization(self): | ||
| """Pins the complement, so inverting the guard can't pass unnoticed.""" | ||
| sentinel = object() | ||
| with ( | ||
| patch("utils.user_context.StateStore.get", return_value="org-123"), | ||
| patch( | ||
| "utils.user_context.Organization.objects.get", return_value=sentinel | ||
| ) as mock_get, | ||
| ): | ||
| assert UserContext.get_organization() is sentinel | ||
| mock_get.assert_called_once_with(organization_id="org-123") | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.