Skip to content

Commit

Permalink
Rename internal/testing to internal/internaltest (#1449)
Browse files Browse the repository at this point in the history
  • Loading branch information
eundoosong authored Jan 12, 2021
1 parent 8d80981 commit 9c94941
Show file tree
Hide file tree
Showing 19 changed files with 22 additions and 21 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm

### Changed

- Rename `internal/testing` to `internal/internaltest`. (#1449)
- Rename `export.SpanData` to `export.SpanSnapshot` and use it only for exporting spans. (#1360)
- Store the parent's full `SpanContext` rather than just its span ID in the `span` struct. (#1360)
- Improve span duration accuracy. (#1360)
Expand Down
2 changes: 1 addition & 1 deletion exporters/otlp/otlpgrpc/alignment_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
"testing"
"unsafe"

ottest "go.opentelemetry.io/otel/internal/testing"
ottest "go.opentelemetry.io/otel/internal/internaltest"
)

// Ensure struct alignment prior to running tests.
Expand Down
2 changes: 1 addition & 1 deletion exporters/trace/jaeger/env_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

ottest "go.opentelemetry.io/otel/internal/testing"
ottest "go.opentelemetry.io/otel/internal/internaltest"
"go.opentelemetry.io/otel/label"
)

Expand Down
2 changes: 1 addition & 1 deletion exporters/trace/jaeger/jaeger_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import (
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/codes"
gen "go.opentelemetry.io/otel/exporters/trace/jaeger/internal/gen-go/jaeger"
ottest "go.opentelemetry.io/otel/internal/testing"
ottest "go.opentelemetry.io/otel/internal/internaltest"
"go.opentelemetry.io/otel/label"
export "go.opentelemetry.io/otel/sdk/export/trace"
"go.opentelemetry.io/otel/sdk/instrumentation"
Expand Down
2 changes: 1 addition & 1 deletion internal/global/internal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
"testing"

"go.opentelemetry.io/otel/internal/global"
ottest "go.opentelemetry.io/otel/internal/testing"
ottest "go.opentelemetry.io/otel/internal/internaltest"
)

// Ensure struct alignment prior to running tests.
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 testing
package internaltest

/*
This file contains common utilities and objects to validate memory alignment
Expand Down
2 changes: 1 addition & 1 deletion internal/testing/env.go → internal/internaltest/env.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 testing
package internaltest

import (
"os"
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 testing
package internaltest

import (
"os"
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 testing
package internaltest

type TestError string

Expand Down
2 changes: 1 addition & 1 deletion metric/alignment_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
"testing"
"unsafe"

internaltest "go.opentelemetry.io/otel/internal/testing"
"go.opentelemetry.io/otel/internal/internaltest"
)

// Ensure struct alignment prior to running tests.
Expand Down
2 changes: 1 addition & 1 deletion oteltest/alignment_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
"testing"
"unsafe"

internaltest "go.opentelemetry.io/otel/internal/testing"
"go.opentelemetry.io/otel/internal/internaltest"
)

// TestMain ensures struct alignment prior to running tests.
Expand Down
6 changes: 3 additions & 3 deletions oteltest/span_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ import (
"time"

"go.opentelemetry.io/otel/codes"
ottest "go.opentelemetry.io/otel/internal/internaltest"
"go.opentelemetry.io/otel/internal/matchers"
ottest "go.opentelemetry.io/otel/internal/testing"
"go.opentelemetry.io/otel/label"
"go.opentelemetry.io/otel/oteltest"
"go.opentelemetry.io/otel/trace"
Expand Down Expand Up @@ -136,7 +136,7 @@ func TestSpan(t *testing.T) {
}{
{
err: ottest.NewTestError("test error"),
typ: "go.opentelemetry.io/otel/internal/testing.TestError",
typ: "go.opentelemetry.io/otel/internal/internaltest.TestError",
msg: "test error",
},
{
Expand Down Expand Up @@ -192,7 +192,7 @@ func TestSpan(t *testing.T) {
Timestamp: testTime,
Name: "error",
Attributes: map[label.Key]label.Value{
label.Key("error.type"): label.StringValue("go.opentelemetry.io/otel/internal/testing.TestError"),
label.Key("error.type"): label.StringValue("go.opentelemetry.io/otel/internal/internaltest.TestError"),
label.Key("error.message"): label.StringValue(errMsg),
},
}}
Expand Down
2 changes: 1 addition & 1 deletion sdk/metric/aggregator/aggregatortest/test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (

"github.com/stretchr/testify/require"

ottest "go.opentelemetry.io/otel/internal/testing"
ottest "go.opentelemetry.io/otel/internal/internaltest"
"go.opentelemetry.io/otel/metric"
"go.opentelemetry.io/otel/metric/number"
export "go.opentelemetry.io/otel/sdk/export/metric"
Expand Down
2 changes: 1 addition & 1 deletion sdk/metric/aggregator/lastvalue/lastvalue_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (

"github.com/stretchr/testify/require"

ottest "go.opentelemetry.io/otel/internal/testing"
ottest "go.opentelemetry.io/otel/internal/internaltest"
"go.opentelemetry.io/otel/metric"
"go.opentelemetry.io/otel/metric/number"
export "go.opentelemetry.io/otel/sdk/export/metric"
Expand Down
2 changes: 1 addition & 1 deletion sdk/metric/aggregator/sum/sum_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (

"github.com/stretchr/testify/require"

ottest "go.opentelemetry.io/otel/internal/testing"
ottest "go.opentelemetry.io/otel/internal/internaltest"
"go.opentelemetry.io/otel/metric"
"go.opentelemetry.io/otel/metric/number"
export "go.opentelemetry.io/otel/sdk/export/metric"
Expand Down
2 changes: 1 addition & 1 deletion sdk/metric/alignment_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
"os"
"testing"

ottest "go.opentelemetry.io/otel/internal/testing"
ottest "go.opentelemetry.io/otel/internal/internaltest"
)

// Ensure struct alignment prior to running tests.
Expand Down
2 changes: 1 addition & 1 deletion sdk/resource/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"github.com/stretchr/testify/require"

"go.opentelemetry.io/otel"
ottest "go.opentelemetry.io/otel/internal/testing"
ottest "go.opentelemetry.io/otel/internal/internaltest"
"go.opentelemetry.io/otel/label"
"go.opentelemetry.io/otel/sdk/resource"
)
Expand Down
2 changes: 1 addition & 1 deletion sdk/resource/env_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

ottest "go.opentelemetry.io/otel/internal/testing"
ottest "go.opentelemetry.io/otel/internal/internaltest"
"go.opentelemetry.io/otel/label"
)

Expand Down
4 changes: 2 additions & 2 deletions sdk/trace/trace_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

ottest "go.opentelemetry.io/otel/internal/testing"
ottest "go.opentelemetry.io/otel/internal/internaltest"
export "go.opentelemetry.io/otel/sdk/export/trace"
"go.opentelemetry.io/otel/sdk/instrumentation"
"go.opentelemetry.io/otel/sdk/resource"
Expand Down Expand Up @@ -1071,7 +1071,7 @@ func TestRecordError(t *testing.T) {
}{
{
err: ottest.NewTestError("test error"),
typ: "go.opentelemetry.io/otel/internal/testing.TestError",
typ: "go.opentelemetry.io/otel/internal/internaltest.TestError",
msg: "test error",
},
{
Expand Down

0 comments on commit 9c94941

Please sign in to comment.