Skip to content
Snippets Groups Projects
Commit b2017651 authored by Manuel Kieweg's avatar Manuel Kieweg
Browse files

go fmt

parent b3babef2
Branches
Tags
1 merge request!90Develop
Pipeline #67396 failed
......@@ -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)
}
}()
......
......@@ -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{}),
......
......@@ -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)
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment