Skip to content

test: cover OIDC upstream allowPrivateIPs in BuildAuthServerRunConfig - #6288

Merged
jhrozek merged 1 commit into
stacklok:mainfrom
alex-feel:crd-upstream-allow-private-ip
Aug 31, 2026
Merged

test: cover OIDC upstream allowPrivateIPs in BuildAuthServerRunConfig#6288
jhrozek merged 1 commit into
stacklok:mainfrom
alex-feel:crd-upstream-allow-private-ip

Conversation

@alex-feel

@alex-feel alex-feel commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

#6428 delivered what this PR originally added: allowPrivateIPs on OIDCUpstreamConfig, wired through buildOIDCUpstreamRunConfig. After a rebase onto current main, the field and all generated manifests are upstream's own, so this PR is now scoped to the piece #6428 did not include: direct regression coverage of the OIDC-side mapping.

What it adds:

  • a default-false assertion on the existing OIDC-upstream case in TestBuildAuthServerRunConfig;
  • an end-to-end case exercising both OIDCUpstreamConfig.AllowPrivateIPs and OAuth2UpstreamConfig.AllowPrivateIPs reaching their run configs through BuildAuthServerRunConfig.

This closes the coverage half of the #4523 ask; the capability itself shipped in v0.46.0.

@alex-feel
alex-feel force-pushed the crd-upstream-allow-private-ip branch 2 times, most recently from 5c70f27 to 9f8ffe6 Compare August 20, 2026 13:58
@alex-feel

Copy link
Copy Markdown
Contributor Author

Updated the branch. Since #6320 added allowPrivateIPs to OAuth2UpstreamConfig (for RFC 8693 delegate clients), this PR no longer needs to add anything on the OAuth2 side. The change is now scoped to the OIDC side only: allowPrivateIP on OIDCUpstreamConfig, mapped in buildOIDCUpstreamRunConfig, with the CRD manifests regenerated accordingly; buildOAuth2UpstreamRunConfig simply uses the pre-existing field. TestBuildAuthServerRunConfig still covers both provider types — the new allowPrivateIP field on the OIDC config and the pre-existing allowPrivateIPs field on the OAuth2 config both reaching the run config. The PR description has been updated to match.

@codecov

codecov Bot commented Aug 27, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.06%. Comparing base (0fb54d4) to head (32f6cda).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6288      +/-   ##
==========================================
+ Coverage   78.01%   78.06%   +0.04%     
==========================================
  Files         767      767              
  Lines       74273    74273              
==========================================
+ Hits        57947    57981      +34     
+ Misses      16321    16287      -34     
  Partials        5        5              

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jhrozek
jhrozek force-pushed the crd-upstream-allow-private-ip branch from 9f8ffe6 to 7a54ea0 Compare August 27, 2026 11:35
@jhrozek

jhrozek commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

huh for some reason CI doesn't kick in?

The operator CRD's OIDC upstream config gained allowPrivateIPs in stacklok#6428, which also wired it through buildOIDCUpstreamRunConfig, so the capability this branch originally added now exists upstream.
stacklok#6428's own tests cover only the OAuth2 side (TestBuildOAuth2UpstreamRunConfig_TransportOptions), leaving the OIDC-side mapping without direct regression coverage.
Add a default-false assertion on the existing OIDC-upstream test case and an end-to-end test that exercises both OIDCUpstreamConfig.AllowPrivateIPs and OAuth2UpstreamConfig.AllowPrivateIPs reaching their run configs through BuildAuthServerRunConfig.
This closes the coverage half of the stacklok#4523 ask; the field itself shipped via stacklok#6428.

Signed-off-by: Aleksandr Filippov <71711753+alex-feel@users.noreply.github.com>
@alex-feel alex-feel changed the title Expose upstream provider allowPrivateIP in MCPExternalAuthConfig test: cover OIDC upstream allowPrivateIPs in BuildAuthServerRunConfig Aug 29, 2026
@alex-feel
alex-feel force-pushed the crd-upstream-allow-private-ip branch from 7a54ea0 to 32f6cda Compare August 29, 2026 19:28
@alex-feel

Copy link
Copy Markdown
Contributor Author

Rebased onto current main. #6428 added the CRD field and its wiring while this PR was open, so the remaining diff is the OIDC-side regression coverage #6428 did not include. Retitled and re-described to match.

@jhrozek
jhrozek merged commit 450ba5f into stacklok:main Aug 31, 2026
75 of 76 checks passed
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.

2 participants