Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup: remove duplicate package import #23433

Merged
merged 1 commit into from
Jan 31, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
21 changes: 10 additions & 11 deletions pkg/k8s/factory_functions_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import (

. "gopkg.in/check.v1"
core_v1 "k8s.io/api/core/v1"
v1 "k8s.io/api/core/v1"
networkingv1 "k8s.io/api/networking/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/client-go/tools/cache"
Expand Down Expand Up @@ -966,14 +965,14 @@ func (s *K8sSuite) Test_ConvertToK8sV1ServicePorts(c *C) {
tests := []struct {
name string
args args
want []v1.ServicePort
want []core_v1.ServicePort
}{
{
name: "empty",
args: args{
ports: []slim_corev1.ServicePort{},
},
want: []v1.ServicePort{},
want: []core_v1.ServicePort{},
},
{
name: "non-empty",
Expand All @@ -985,7 +984,7 @@ func (s *K8sSuite) Test_ConvertToK8sV1ServicePorts(c *C) {
},
},
},
want: []v1.ServicePort{
want: []core_v1.ServicePort{
{
Name: "foo",
Port: int32(1),
Expand All @@ -1007,14 +1006,14 @@ func (s *K8sSuite) Test_ConvertToK8sV1SessionAffinityConfig(c *C) {
tests := []struct {
name string
args args
want *v1.SessionAffinityConfig
want *core_v1.SessionAffinityConfig
}{
{
name: "empty",
args: args{
cfg: &slim_corev1.SessionAffinityConfig{},
},
want: &v1.SessionAffinityConfig{},
want: &core_v1.SessionAffinityConfig{},
},
{
name: "non-empty",
Expand All @@ -1025,8 +1024,8 @@ func (s *K8sSuite) Test_ConvertToK8sV1SessionAffinityConfig(c *C) {
},
},
},
want: &v1.SessionAffinityConfig{
ClientIP: &v1.ClientIPConfig{
want: &core_v1.SessionAffinityConfig{
ClientIP: &core_v1.ClientIPConfig{
TimeoutSeconds: &ts,
},
},
Expand All @@ -1045,14 +1044,14 @@ func (s *K8sSuite) Test_ConvertToK8sV1LoadBalancerIngress(c *C) {
tests := []struct {
name string
args args
want []v1.LoadBalancerIngress
want []core_v1.LoadBalancerIngress
}{
{
name: "empty",
args: args{
ings: []slim_corev1.LoadBalancerIngress{},
},
want: []v1.LoadBalancerIngress{},
want: []core_v1.LoadBalancerIngress{},
},
{
name: "non-empty",
Expand All @@ -1063,7 +1062,7 @@ func (s *K8sSuite) Test_ConvertToK8sV1LoadBalancerIngress(c *C) {
},
},
},
want: []v1.LoadBalancerIngress{
want: []core_v1.LoadBalancerIngress{
{
IP: "1.1.1.1",
Ports: nil,
Expand Down