Skip to content

Update Git Access specs to remove stubbing

Drew Blessing requested to merge dblessing_git_access_sso_spec_improvements into master

What does this MR do and why?

Git access tests previously stubbed SSO checks. This makes it very difficult to have any level of confidence that changes to SSO enforcement classes won't negatively affect Git access control. This change ensures we test the exact SSO state and access control outcome.

There are two test lines which include a comment # bug. These will be fixed in a follow-up merge request, but the first step is ensuring we have comprehensive tests so we have confidence the bug fix won't cause unintended side-effects.

These tests are very similar to what we built for SSO enforcer specs

I am fairly certain there are missing test cases, so please feel free to call those out. There are conditionals in the SessionEnforcer for when there's no group or provider, and for when the user is a bot. Those cases are missing here for sure.

Tests should also be updated in SessionEnforcer in a similar style. I will do that separately.

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Drew Blessing

Merge request reports

Loading