From 7f79e165715e82aa3fd7be1059f3a5298b37260f Mon Sep 17 00:00:00 2001 From: maorui <2717070546@qq.com> Date: Sat, 16 Sep 2023 22:02:24 +0800 Subject: [PATCH] add coverage --- pkg/trace/jaeger/jaeger_test.go | 33 +++++++++++++++++++++++++++++---- pkg/trace/trace_test.go | 32 ++++++++++++++++++++++++++++---- 2 files changed, 57 insertions(+), 8 deletions(-) diff --git a/pkg/trace/jaeger/jaeger_test.go b/pkg/trace/jaeger/jaeger_test.go index 9900667a..417e95b7 100644 --- a/pkg/trace/jaeger/jaeger_test.go +++ b/pkg/trace/jaeger/jaeger_test.go @@ -1,14 +1,39 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package jaeger import ( "context" - "github.com/arana-db/arana/pkg/config" - "github.com/arana-db/arana/pkg/proto" - "github.com/arana-db/arana/pkg/proto/hint" + "testing" +) + +import ( "github.com/golang/mock/gomock" + "github.com/stretchr/testify/assert" + "go.opentelemetry.io/otel" - "testing" +) + +import ( + "github.com/arana-db/arana/pkg/config" + "github.com/arana-db/arana/pkg/proto" + "github.com/arana-db/arana/pkg/proto/hint" ) func TestJaegerProvider(t *testing.T) { diff --git a/pkg/trace/trace_test.go b/pkg/trace/trace_test.go index 7b77f5df..7833a153 100644 --- a/pkg/trace/trace_test.go +++ b/pkg/trace/trace_test.go @@ -1,14 +1,38 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package trace import ( "context" + "sync" + "testing" +) + +import ( + "github.com/golang/mock/gomock" + + "github.com/stretchr/testify/assert" +) + +import ( "github.com/arana-db/arana/pkg/config" "github.com/arana-db/arana/pkg/proto" "github.com/arana-db/arana/pkg/proto/hint" - "github.com/golang/mock/gomock" - "github.com/stretchr/testify/assert" - "sync" - "testing" ) type TestProvider struct{}