Skip to content
This repository has been archived by the owner on Apr 22, 2024. It is now read-only.

Generalize test client #28

Merged
merged 1 commit into from
Feb 20, 2024
Merged

Generalize test client #28

merged 1 commit into from
Feb 20, 2024

Conversation

nacx
Copy link
Member

@nacx nacx commented Feb 20, 2024

This refactors the Makefiles and extracts common environment variables to a file that can be independently imported.

It also refactors the OIDC interactions and encapsulates them in an OIDCTestClient to have cleaner tests and be able to reuse the logic in different e2e test suites. It also cleans up the logging and cookie tracking logic in independent RoundTrippers to be able to enable/disable the desired stuff as needed.

@nacx nacx requested a review from sergicastro February 20, 2024 12:40
Copy link

codecov bot commented Feb 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (f5617dd) 89.34% compared to head (c9b5188) 89.37%.
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #28      +/-   ##
==========================================
+ Coverage   89.34%   89.37%   +0.02%     
==========================================
  Files          17       17              
  Lines        1117     1120       +3     
==========================================
+ Hits          998     1001       +3     
  Misses         85       85              
  Partials       34       34              
Files Coverage Δ
internal/authz/oidc.go 90.25% <100.00%> (+0.05%) ⬆️
internal/config.go 97.00% <100.00%> (ø)

... and 1 file with indirect coverage changes

@nacx nacx enabled auto-merge (squash) February 20, 2024 14:12
}
}

defaultTransport.TLSClientConfig = client.tlsConfig
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
defaultTransport.TLSClientConfig = client.tlsConfig
// setup the same TLS config into the transport used by the delegate client
defaultTransport.TLSClientConfig = client.tlsConfig

@nacx nacx merged commit 367cf27 into main Feb 20, 2024
8 checks passed
@nacx nacx deleted the generalize-test-client branch February 20, 2024 14:28
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants