You've already forked opentelemetry-go
							
							
				mirror of
				https://github.com/open-telemetry/opentelemetry-go.git
				synced 2025-10-31 00:07:40 +02:00 
			
		
		
		
	Rename internal/testing to internal/internaltest (#1449)
This commit is contained in:
		| @@ -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) | ||||
|   | ||||
| @@ -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. | ||||
|   | ||||
| @@ -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" | ||||
| ) | ||||
|  | ||||
|   | ||||
| @@ -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" | ||||
|   | ||||
| @@ -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. | ||||
|   | ||||
| @@ -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 | ||||
| @@ -12,7 +12,7 @@ | ||||
| // See the License for the specific language governing permissions and | ||||
| // limitations under the License. | ||||
| 
 | ||||
| package testing | ||||
| package internaltest | ||||
| 
 | ||||
| import ( | ||||
| 	"os" | ||||
| @@ -12,7 +12,7 @@ | ||||
| // See the License for the specific language governing permissions and | ||||
| // limitations under the License. | ||||
| 
 | ||||
| package testing | ||||
| package internaltest | ||||
| 
 | ||||
| import ( | ||||
| 	"os" | ||||
| @@ -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 | ||||
| 
 | ||||
| @@ -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. | ||||
|   | ||||
| @@ -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. | ||||
|   | ||||
| @@ -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), | ||||
| 				}, | ||||
| 			}} | ||||
|   | ||||
| @@ -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" | ||||
|   | ||||
| @@ -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" | ||||
|   | ||||
| @@ -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" | ||||
|   | ||||
| @@ -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. | ||||
|   | ||||
| @@ -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" | ||||
| ) | ||||
|   | ||||
| @@ -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" | ||||
| ) | ||||
|  | ||||
|   | ||||
| @@ -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", | ||||
| 		}, | ||||
| 		{ | ||||
|   | ||||
		Reference in New Issue
	
	Block a user