Skip to content

Commit

Permalink
Rename test packages (open-telemetry#1049)
Browse files Browse the repository at this point in the history
* Rename processor/test to processortest

* Rename controller/test to controllertest

* Rename testharness to apitest

* Rename testtrace to tracetest
  • Loading branch information
eundoosong authored Aug 10, 2020
1 parent efd4e3a commit 4d0101a
Show file tree
Hide file tree
Showing 27 changed files with 122 additions and 120 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm

### Changed

- Rename `sdk/metric/processor/test` to `sdk/metric/processor/processortest`
- Rename `sdk/metric/controller/test` to `sdk/metric/controller/controllertest`
- Rename `api/testharness` to `api/apitest`
- Rename `api/trace/testtrace` to `api/trace/tracetest`
- The `go.opentelemetry.io/otel/bridge/opentracing` bridge package has been made into its own module.
This removes the package dependencies of this bridge from the rest of the OpenTelemetry based project. (#1038)
- Renamed `go.opentelemetry.io/otel/api/standard` package to `go.opentelemetry.io/otel/semconv` to avoid the ambiguous and generic name `standard` and better describe the package as containing OpenTelemetry semantic conventions. (#1016)
Expand Down
2 changes: 1 addition & 1 deletion api/testharness/harness.go → api/apitest/harness.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package testharness
package apitest

import (
"context"
Expand Down
2 changes: 1 addition & 1 deletion api/testharness/package.go → api/apitest/package.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package testharness // import "go.opentelemetry.io/otel/api/testharness"
package apitest // import "go.opentelemetry.io/otel/api/apitest"
8 changes: 4 additions & 4 deletions api/global/internal/trace_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (

"go.opentelemetry.io/otel/api/global"
"go.opentelemetry.io/otel/api/global/internal"
"go.opentelemetry.io/otel/api/trace/testtrace"
"go.opentelemetry.io/otel/api/trace/tracetest"
)

func TestTraceWithSDK(t *testing.T) {
Expand All @@ -34,8 +34,8 @@ func TestTraceWithSDK(t *testing.T) {
// This is started before an SDK was registered and should be dropped.
_, span1 := tracer1.Start(ctx, "span1")

sr := new(testtrace.StandardSpanRecorder)
tp := testtrace.NewProvider(testtrace.WithSpanRecorder(sr))
sr := new(tracetest.StandardSpanRecorder)
tp := tracetest.NewProvider(tracetest.WithSpanRecorder(sr))
global.SetTraceProvider(tp)

// This span was started before initialization, it is expected to be dropped.
Expand All @@ -50,7 +50,7 @@ func TestTraceWithSDK(t *testing.T) {
_, span3 := tracer2.Start(ctx, "span3")
span3.End()

filterNames := func(spans []*testtrace.Span) []string {
filterNames := func(spans []*tracetest.Span) []string {
names := make([]string, len(spans))
for i := range spans {
names[i] = spans[i].Name()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package testtrace_test
package tracetest_test

import (
"context"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package testtrace_test
package tracetest_test

import (
"fmt"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package testtrace_test
package tracetest_test

import (
"context"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package testtrace
package tracetest

import (
"context"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package testtrace
package tracetest

import (
"time"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package testtrace // import "go.opentelemetry.io/otel/api/trace/testtrace"
package tracetest // import "go.opentelemetry.io/otel/api/trace/tracetest"
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package testtrace_test
package tracetest_test

import (
"context"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package testtrace
package tracetest

import (
"sync"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package testtrace
package tracetest

import (
"context"
Expand Down
Loading

0 comments on commit 4d0101a

Please sign in to comment.