Fix comments
Signed-off-by: z1cheng <imchench@gmail.com>
This commit is contained in:
parent
64f7bf84ba
commit
dbc161acc4
4 changed files with 9 additions and 7 deletions
|
@ -1228,12 +1228,12 @@ func buildOpentracing(c, s interface{}) string {
|
|||
|
||||
buf := bytes.NewBufferString("")
|
||||
|
||||
switch {
|
||||
case cfg.DatadogCollectorHost != "":
|
||||
//nolint:gocritic // rewriting if-else to switch statement is not more readable
|
||||
if cfg.DatadogCollectorHost != "" {
|
||||
buf.WriteString("opentracing_load_tracer /usr/local/lib/libdd_opentracing.so /etc/nginx/opentracing.json;")
|
||||
case cfg.ZipkinCollectorHost != "":
|
||||
} else if cfg.ZipkinCollectorHost != "" {
|
||||
buf.WriteString("opentracing_load_tracer /usr/local/lib/libzipkin_opentracing_plugin.so /etc/nginx/opentracing.json;")
|
||||
case cfg.JaegerCollectorHost != "" || cfg.JaegerEndpoint != "":
|
||||
} else if cfg.JaegerCollectorHost != "" || cfg.JaegerEndpoint != "" {
|
||||
buf.WriteString("opentracing_load_tracer /usr/local/lib/libjaegertracing_plugin.so /etc/nginx/opentracing.json;")
|
||||
}
|
||||
|
||||
|
|
|
@ -227,7 +227,7 @@ func ConfigureCRL(name string, crl []byte, sslCert *ingress.SSLCert) error {
|
|||
|
||||
_, err := x509.ParseRevocationList(pemCRLBlock.Bytes)
|
||||
if err != nil {
|
||||
return errors.New(err.Error())
|
||||
return err
|
||||
}
|
||||
|
||||
err = os.WriteFile(crlFileName, crl, 0o600)
|
||||
|
|
|
@ -185,12 +185,13 @@ func downloadDatabase(dbName string) error {
|
|||
return err
|
||||
}
|
||||
|
||||
//nolint:gocritic // TODO: will fix it on a followup PR
|
||||
defer outFile.Close()
|
||||
|
||||
if _, err := io.CopyN(outFile, tarReader, header.Size); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
outFile.Close()
|
||||
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
|
|
@ -85,6 +85,7 @@ var _ = framework.IngressNginxDescribeSerial("[TopologyHints] topology aware rou
|
|||
}
|
||||
|
||||
if gotHints {
|
||||
// we have 2 replics, if there is just one backend it means that we are routing according slices hints to same zone as controller is
|
||||
assert.Equal(ginkgo.GinkgoT(), 1, gotBackends)
|
||||
} else {
|
||||
// two replicas should have two endpoints without topology hints
|
||||
|
|
Loading…
Reference in a new issue