diff --git a/nucleus/controller_test.go b/nucleus/controller_test.go index c414d6c61dc1e538b494dd53df65d7b6f10f288d..0e5fc9596163533675884874743b2f13bbbcba6e 100644 --- a/nucleus/controller_test.go +++ b/nucleus/controller_test.go @@ -12,29 +12,29 @@ func TestRun(t *testing.T) { request string } tests := []struct { - name string - args args - want interface{} + name string + args args + want interface{} }{ { - name: "liveliness indicator", - args: args{request: apiEndpoint + "/livez"}, - want: http.StatusOK, + name: "liveliness indicator", + args: args{request: apiEndpoint + "/livez"}, + want: http.StatusOK, }, { - name: "readyness indicator", - args: args{request: apiEndpoint + "/readyz"}, - want: http.StatusOK, + name: "readyness indicator", + args: args{request: apiEndpoint + "/readyz"}, + want: http.StatusOK, }, { - name: "init", - args: args{request: apiEndpoint + "/api?q=init"}, - want: http.StatusOK, + name: "init", + args: args{request: apiEndpoint + "/api?q=init"}, + want: http.StatusOK, }, } ctx, cancel := context.WithCancel(context.Background()) go func() { - if err := Run(ctx); err != nil{ + if err := Run(ctx); err != nil { t.Errorf("Run() error = %v", err) } }() diff --git a/nucleus/gnmi_transport.go b/nucleus/gnmi_transport.go index a5d6a5fc3103d8e9d623c8691bb92ea4b1601761..3bbcc03c6146804d862af1932f5cac2a4a0fca86 100644 --- a/nucleus/gnmi_transport.go +++ b/nucleus/gnmi_transport.go @@ -233,7 +233,7 @@ func (g *Gnmi) set(ctx context.Context, setOps []*gnmi.Operation, func (g *Gnmi) subscribe(ctx context.Context) error { ctx = gnmi.NewContext(ctx, &g.Options.Config) opts, ok := ctx.Value(CtxKeyOpts).(*gnmi.SubscribeOptions) - if !ok{ + if !ok { return &ErrInvalidTypeAssertion{ v: reflect.TypeOf(ctx.Value(CtxKeyOpts)), t: reflect.TypeOf(&gnmi.SubscribeOptions{}), diff --git a/nucleus/initialise_test.go b/nucleus/initialise_test.go index 16e0f2f02df749093da38d2278e787615ab1fcd8..d2fe0a04b8966fd46329313eaeaa03deeaccca8f 100644 --- a/nucleus/initialise_test.go +++ b/nucleus/initialise_test.go @@ -46,7 +46,6 @@ var gnmiAddress = "141.100.70.171:6030" func TestMain(m *testing.M) { log.SetReportCaller(true) - if os.Getenv("GOSDN_LOG") == "nolog" { log.SetLevel(log.PanicLevel) }