1
0
Fork 0

Merge branch v2.11 into v3.4

This commit is contained in:
romain 2025-06-02 11:38:16 +02:00
commit bd4bfd8919
110 changed files with 493 additions and 494 deletions

View file

@ -1,7 +1,6 @@
package ingress
import (
"context"
"errors"
"math"
"os"
@ -1657,7 +1656,7 @@ func TestLoadConfigurationFromIngresses(t *testing.T) {
DisableClusterScopeResources: test.disableClusterScopeResources,
DefaultRuleSyntax: test.defaultRuleSyntax,
}
conf := p.loadConfigurationFromIngresses(context.Background(), clientMock)
conf := p.loadConfigurationFromIngresses(t.Context(), clientMock)
assert.Equal(t, test.expected, conf)
})
@ -1783,7 +1782,7 @@ func TestLoadConfigurationFromIngressesWithExternalNameServices(t *testing.T) {
p := Provider{IngressClass: test.ingressClass}
p.AllowExternalNameServices = test.allowExternalNameServices
conf := p.loadConfigurationFromIngresses(context.Background(), clientMock)
conf := p.loadConfigurationFromIngresses(t.Context(), clientMock)
assert.Equal(t, test.expected, conf)
})
@ -1833,7 +1832,7 @@ func TestLoadConfigurationFromIngressesWithNativeLB(t *testing.T) {
clientMock := newClientMock(generateTestFilename(test.desc))
p := Provider{IngressClass: test.ingressClass}
conf := p.loadConfigurationFromIngresses(context.Background(), clientMock)
conf := p.loadConfigurationFromIngresses(t.Context(), clientMock)
assert.Equal(t, test.expected, conf)
})
@ -1894,7 +1893,7 @@ func TestLoadConfigurationFromIngressesWithNodePortLB(t *testing.T) {
clientMock := newClientMock(generateTestFilename(test.desc))
p := Provider{DisableClusterScopeResources: test.clusterScopeDisabled}
conf := p.loadConfigurationFromIngresses(context.Background(), clientMock)
conf := p.loadConfigurationFromIngresses(t.Context(), clientMock)
assert.Equal(t, test.expected, conf)
})
@ -2066,7 +2065,7 @@ func TestGetCertificates(t *testing.T) {
t.Parallel()
tlsConfigs := map[string]*tls.CertAndStores{}
err := getCertificates(context.Background(), test.ingress, test.client, tlsConfigs)
err := getCertificates(t.Context(), test.ingress, test.client, tlsConfigs)
if test.errResult != "" {
assert.EqualError(t, err, test.errResult)
@ -2152,7 +2151,7 @@ func TestLoadConfigurationFromIngressesWithNativeLBByDefault(t *testing.T) {
IngressClass: test.ingressClass,
NativeLBByDefault: true,
}
conf := p.loadConfigurationFromIngresses(context.Background(), clientMock)
conf := p.loadConfigurationFromIngresses(t.Context(), clientMock)
assert.Equal(t, test.expected, conf)
})
@ -2252,9 +2251,9 @@ func TestIngressEndpointPublishedService(t *testing.T) {
PublishedService: "default/published-service",
},
}
p.loadConfigurationFromIngresses(context.Background(), client)
p.loadConfigurationFromIngresses(t.Context(), client)
ingress, err := kubeClient.NetworkingV1().Ingresses(metav1.NamespaceDefault).Get(context.Background(), "foo", metav1.GetOptions{})
ingress, err := kubeClient.NetworkingV1().Ingresses(metav1.NamespaceDefault).Get(t.Context(), "foo", metav1.GetOptions{})
require.NoError(t, err)
assert.Equal(t, test.expected, ingress.Status.LoadBalancer.Ingress)