Skip to content
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

Show Okta Enforced Repos when Impersonating #786

Merged
merged 2 commits into from
Sep 6, 2024
Merged

Conversation

nora-codecov
Copy link
Contributor

@nora-codecov nora-codecov requested review from michelletran-codecov and a team August 29, 2024 22:10
@nora-codecov nora-codecov requested a review from a team as a code owner August 29, 2024 22:10
@codecov-notifications
Copy link

codecov-notifications bot commented Aug 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

Copy link

codecov bot commented Aug 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.15%. Comparing base (a39ae25) to head (e904b39).
Report is 1 commits behind head on main.

Changes have been made to critical files, which contain lines commonly executed in production. Learn more

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@               Coverage Diff                @@
##               main       #786        +/-   ##
================================================
+ Coverage   96.14000   96.15000   +0.01000     
================================================
  Files           812        812                
  Lines         18503      18524        +21     
================================================
+ Hits          17790      17811        +21     
  Misses          713        713                
Flag Coverage Δ
unit 92.00% <100.00%> (+<0.01%) ⬆️
unit-latest-uploader 92.00% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@codecov-qa
Copy link

codecov-qa bot commented Sep 3, 2024

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
2273 1 2272 6
View the top 1 failed tests by shortest run time
api.internal.tests.views.test_self_hosted_user_viewset.UserViewsetAdminTestCase test_list_users_filter_admin
Stack Traces | 0.347s run time
self = &lt;test_self_hosted_user_viewset.UserViewsetAdminTestCase testMethod=test_list_users_filter_admin&gt;
admin_owners = &lt;MagicMock name='admin_owners' id='140002424153936'&gt;

    @patch("services.self_hosted.admin_owners")
    def test_list_users_filter_admin(self, admin_owners):
        admin_owners.return_value = Owner.objects.filter(pk__in=[self.current_owner.pk])
    
        OwnerFactory()
    
        res = self.client.get(reverse("selfhosted-users-list"), {"is_admin": True})
        assert res.status_code == 200
&gt;       assert res.json() == {
            "count": 1,
            "next": None,
            "previous": None,
            "results": [
                {
                    "ownerid": self.current_owner.pk,
                    "username": self.current_owner.username,
                    "email": self.current_owner.email,
                    "name": self.current_owner.name,
                    "is_admin": True,
                    "activated": False,
                },
            ],
            "total_pages": 1,
        }
E       AssertionError: assert {'count': 1, ...', ...}], ...} == {'count': 1, ...', ...}], ...}
E         
E         Omitting 4 identical items, use -vv to show
E         Differing items:
E         {'results': [{'activated': False, 'email': 'bpugh@perkins-rhodes.com', 'is_admin': True, 'name': 'Sean Miller', ...}]} != {'results': [{'activated': False, 'email': 'bpugh@perkins-rhodes.com', 'is_admin': True, 'name': 'Sean Miller', ...}]}
E         Use -v to get more diff

.../tests/views/test_self_hosted_user_viewset.py:133: AssertionError

To view individual test run time comparison to the main branch, go to the Test Analytics Dashboard

Copy link

codecov-public-qa bot commented Sep 3, 2024

Test Failures Detected: Due to failing tests, we cannot provide coverage reports at this time.

❌ Failed Test Results:

Completed 2279 tests with 1 failed, 2272 passed and 6 skipped.

View the full list of failed tests

pytest

  • Class name: api.internal.tests.views.test_self_hosted_user_viewset.UserViewsetAdminTestCase
    Test name: test_list_users_filter_admin

    self = <test_self_hosted_user_viewset.UserViewsetAdminTestCase testMethod=test_list_users_filter_admin>
    admin_owners = <MagicMock name='admin_owners' id='140002424153936'>

    @patch("services.self_hosted.admin_owners")
    def test_list_users_filter_admin(self, admin_owners):
    admin_owners.return_value = Owner.objects.filter(pk__in=[self.current_owner.pk])

    OwnerFactory()

    res = self.client.get(reverse("selfhosted-users-list"), {"is_admin": True})
    assert res.status_code == 200
    > assert res.json() == {
    "count": 1,
    "next": None,
    "previous": None,
    "results": [
    {
    "ownerid": self.current_owner.pk,
    "username": self.current_owner.username,
    "email": self.current_owner.email,
    "name": self.current_owner.name,
    "is_admin": True,
    "activated": False,
    },
    ],
    "total_pages": 1,
    }
    E AssertionError: assert {'count': 1, ...', ...}], ...} == {'count': 1, ...', ...}], ...}
    E
    E Omitting 4 identical items, use -vv to show
    E Differing items:
    E {'results': [{'activated': False, 'email': 'bpugh@perkins-rhodes.com', 'is_admin': True, 'name': 'Sean Miller', ...}]} != {'results': [{'activated': False, 'email': 'bpugh@perkins-rhodes.com', 'is_admin': True, 'name': 'Sean Miller', ...}]}
    E Use -v to get more diff

    .../tests/views/test_self_hosted_user_viewset.py:133: AssertionError

@michelletran-codecov michelletran-codecov changed the title flip flag when impersonating Show Okta Enforced Repos when Impersonating Sep 6, 2024
@michelletran-codecov michelletran-codecov added this pull request to the merge queue Sep 6, 2024
Merged via the queue into main with commit ab61f47 Sep 6, 2024
19 of 20 checks passed
@michelletran-codecov michelletran-codecov deleted the nora/711 branch September 6, 2024 14:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants