Update all dependencies, conforming to the new controller-runtime API (#3949)

This commit is contained in:
Nikola Jokic
2025-03-11 15:52:52 +01:00
committed by GitHub
parent a325cc745a
commit fb9b96bf75
54 changed files with 20471 additions and 5249 deletions
+19 -5
View File
@@ -84,7 +84,12 @@ func TestServerWithSelfSignedCertificates(t *testing.T) {
})
t.Run("client with ca certs", func(t *testing.T) {
server := startNewTLSTestServer(t, certPath, keyPath, http.HandlerFunc(h))
server := startNewTLSTestServer(
t,
certPath,
keyPath,
http.HandlerFunc(h),
)
u = server.URL
configURL := server.URL + "/my-org"
@@ -98,7 +103,11 @@ func TestServerWithSelfSignedCertificates(t *testing.T) {
pool := x509.NewCertPool()
require.True(t, pool.AppendCertsFromPEM(cert))
client, err := actions.NewClient(configURL, auth, actions.WithRootCAs(pool))
client, err := actions.NewClient(
configURL,
auth,
actions.WithRootCAs(pool),
)
require.NoError(t, err)
assert.NotNil(t, client)
@@ -109,7 +118,7 @@ func TestServerWithSelfSignedCertificates(t *testing.T) {
t.Run("client with ca chain certs", func(t *testing.T) {
server := startNewTLSTestServer(
t,
filepath.Join("testdata", "leaf.pem"),
filepath.Join("testdata", "leaf.crt"),
filepath.Join("testdata", "leaf.key"),
http.HandlerFunc(h),
)
@@ -120,13 +129,18 @@ func TestServerWithSelfSignedCertificates(t *testing.T) {
Token: "token",
}
cert, err := os.ReadFile(filepath.Join("testdata", "intermediate.pem"))
cert, err := os.ReadFile(filepath.Join("testdata", "intermediate.crt"))
require.NoError(t, err)
pool := x509.NewCertPool()
require.True(t, pool.AppendCertsFromPEM(cert))
client, err := actions.NewClient(configURL, auth, actions.WithRootCAs(pool), actions.WithRetryMax(0))
client, err := actions.NewClient(
configURL,
auth,
actions.WithRootCAs(pool),
actions.WithRetryMax(0),
)
require.NoError(t, err)
require.NotNil(t, client)