Skip to content

Commit 11080dc

Browse files
committed
fix linter issues
1 parent 4dbfc94 commit 11080dc

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

cns/healthserver/healthz.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ import (
88
meta "k8s.io/apimachinery/pkg/api/meta"
99
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
1010
"k8s.io/apimachinery/pkg/runtime"
11-
"k8s.io/client-go/rest"
1211
utilruntime "k8s.io/apimachinery/pkg/util/runtime"
12+
"k8s.io/client-go/rest"
1313
ctrl "sigs.k8s.io/controller-runtime"
1414
"sigs.k8s.io/controller-runtime/pkg/client"
1515
apiutil "sigs.k8s.io/controller-runtime/pkg/client/apiutil"

cns/healthserver/healthz_test.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ import (
88
"testing"
99

1010
"github.com/stretchr/testify/require"
11-
meta "k8s.io/apimachinery/pkg/api/meta"
12-
"k8s.io/apimachinery/pkg/runtime/schema"
11+
meta "k8s.io/apimachinery/pkg/api/meta"
12+
"k8s.io/apimachinery/pkg/runtime/schema"
1313
)
1414

1515
const nncCRD = `{
@@ -161,10 +161,10 @@ const nncResult = `{
161161
}`
162162

163163
func staticNNCMapper() meta.RESTMapper {
164-
gv := schema.GroupVersion{Group: "acn.azure.com", Version: "v1alpha"}
165-
m := meta.NewDefaultRESTMapper([]schema.GroupVersion{gv})
166-
m.Add(schema.GroupVersionKind{Group: gv.Group, Version: gv.Version, Kind: "NodeNetworkConfig"}, meta.RESTScopeNamespace)
167-
return m
164+
gv := schema.GroupVersion{Group: "acn.azure.com", Version: "v1alpha"}
165+
m := meta.NewDefaultRESTMapper([]schema.GroupVersion{gv})
166+
m.Add(schema.GroupVersionKind{Group: gv.Group, Version: gv.Version, Kind: "NodeNetworkConfig"}, meta.RESTScopeNamespace)
167+
return m
168168
}
169169

170170
func TestNewHealthzHandlerWithChecks(t *testing.T) {
@@ -178,7 +178,7 @@ func TestNewHealthzHandlerWithChecks(t *testing.T) {
178178
name: "list NNC gives 200 should indicate healthy",
179179
config: &Config{
180180
PingAPIServer: true,
181-
Mapper: staticNNCMapper(),
181+
Mapper: staticNNCMapper(),
182182
},
183183
apiStatusCode: http.StatusOK,
184184
expectedHealthy: true,
@@ -187,7 +187,7 @@ func TestNewHealthzHandlerWithChecks(t *testing.T) {
187187
name: "unauthorized (401) from apiserver should be unhealthy",
188188
config: &Config{
189189
PingAPIServer: true,
190-
Mapper: staticNNCMapper(),
190+
Mapper: staticNNCMapper(),
191191
},
192192
apiStatusCode: http.StatusUnauthorized,
193193
expectedHealthy: false,
@@ -196,7 +196,7 @@ func TestNewHealthzHandlerWithChecks(t *testing.T) {
196196
name: "channel nodesubnet should not call apiserver so it doesn't matter if the status code is a 401",
197197
config: &Config{
198198
PingAPIServer: false,
199-
Mapper: staticNNCMapper(),
199+
Mapper: staticNNCMapper(),
200200
},
201201
apiStatusCode: http.StatusUnauthorized,
202202
expectedHealthy: true,

0 commit comments

Comments
 (0)