Skip to content

Commit

Permalink
Fixed stray import loop
Browse files Browse the repository at this point in the history
Signed-off-by: nicklesimba <[email protected]>
  • Loading branch information
nicklesimba committed May 30, 2022
1 parent 9176123 commit 11fe8df
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
1 change: 0 additions & 1 deletion pkg/reconciler/ip.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// package main
package reconciler

import (
Expand Down
15 changes: 7 additions & 8 deletions pkg/reconciler/ip_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import (

multusv1 "github.com/k8snetworkplumbingwg/network-attachment-definition-client/pkg/apis/k8s.cni.cncf.io/v1"
"github.com/k8snetworkplumbingwg/whereabouts/pkg/api/whereabouts.cni.cncf.io/v1alpha1"
"github.com/k8snetworkplumbingwg/whereabouts/pkg/reconciler"

v1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand All @@ -30,7 +29,7 @@ var _ = Describe("Whereabouts IP reconciler", func() {
)

var (
reconcileLooper *reconciler.ReconcileLooper
reconcileLooper *ReconcileLooper
)

Context("reconciling IP pools with a single running pod", func() {
Expand Down Expand Up @@ -67,7 +66,7 @@ var _ = Describe("Whereabouts IP reconciler", func() {
Context("reconciling the IPPool", func() {
BeforeEach(func() {
var err error
reconcileLooper, err = reconciler.NewReconcileLooperWithKubeconfig(context.TODO(), kubeConfigPath, timeout)
reconcileLooper, err = NewReconcileLooperWithKubeconfig(context.TODO(), kubeConfigPath, timeout)
Expect(err).NotTo(HaveOccurred())
})

Expand Down Expand Up @@ -138,7 +137,7 @@ var _ = Describe("Whereabouts IP reconciler", func() {
Context("reconciling the IPPool", func() {
BeforeEach(func() {
var err error
reconcileLooper, err = reconciler.NewReconcileLooperWithKubeconfig(context.TODO(), kubeConfigPath, timeout)
reconcileLooper, err = NewReconcileLooperWithKubeconfig(context.TODO(), kubeConfigPath, timeout)
Expect(err).NotTo(HaveOccurred())
})

Expand Down Expand Up @@ -243,7 +242,7 @@ var _ = Describe("Whereabouts IP reconciler", func() {

It("will delete an orphaned IP address", func() {
Expect(k8sClientSet.CoreV1().Pods(namespace).Delete(context.TODO(), pods[podIndexToRemove].Name, metav1.DeleteOptions{})).NotTo(HaveOccurred())
newReconciler, err := reconciler.NewReconcileLooperWithKubeconfig(context.TODO(), kubeConfigPath, timeout)
newReconciler, err := NewReconcileLooperWithKubeconfig(context.TODO(), kubeConfigPath, timeout)
Expect(err).NotTo(HaveOccurred())
Expect(newReconciler.ReconcileOverlappingIPAddresses(context.TODO())).To(Succeed())

Expand Down Expand Up @@ -271,7 +270,7 @@ var _ = Describe("Whereabouts IP reconciler", func() {
pool = generateIPPoolSpec(ipRange, namespace, poolName, pod.Name)
Expect(k8sClient.Create(context.Background(), pool)).NotTo(HaveOccurred())

reconcileLooper, err = reconciler.NewReconcileLooperWithKubeconfig(context.TODO(), kubeConfigPath, timeout)
reconcileLooper, err = NewReconcileLooperWithKubeconfig(context.TODO(), kubeConfigPath, timeout)
Expect(err).NotTo(HaveOccurred())
})

Expand Down Expand Up @@ -348,8 +347,8 @@ func generatePodAnnotations(ipNetworks ...ipInNetwork) map[string]string {
networks = append(networks, ipNetworkInfo.networkName)
}
networkAnnotations := map[string]string{
reconciler.MultusNetworkAnnotation: strings.Join(networks, ","),
reconciler.MultusNetworkStatusAnnotation: generatePodNetworkStatusAnnotation(ipNetworks...),
MultusNetworkAnnotation: strings.Join(networks, ","),
MultusNetworkStatusAnnotation: generatePodNetworkStatusAnnotation(ipNetworks...),
}
return networkAnnotations
}
Expand Down

0 comments on commit 11fe8df

Please sign in to comment.