1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2024-12-30 21:20:04 +02:00

Rename internal/testing to internal/internaltest (#1449)

This commit is contained in:
Eundoo Song 2021-01-13 01:56:16 +09:00 committed by GitHub
parent 8d80981465
commit 9c949411ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
19 changed files with 22 additions and 21 deletions

View File

@ -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)

View File

@ -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.

View File

@ -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"
)

View File

@ -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"

View File

@ -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.

View File

@ -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

View File

@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package testing
package internaltest
import (
"os"

View File

@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package testing
package internaltest
import (
"os"

View File

@ -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

View File

@ -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.

View File

@ -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.

View File

@ -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"
@ -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",
},
{
@ -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),
},
}}

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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.

View File

@ -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"
)

View File

@ -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"
)

View File

@ -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"
@ -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",
},
{