@@ -28,7 +28,7 @@ import (
28
28
"github.com/stretchr/testify/require"
29
29
30
30
"go.opentelemetry.io/collector/component"
31
- "go.opentelemetry.io/collector/component/componenttest "
31
+ "go.opentelemetry.io/collector/service/servicetest "
32
32
)
33
33
34
34
func TestStateString (t * testing.T ) {
@@ -40,7 +40,7 @@ func TestStateString(t *testing.T) {
40
40
}
41
41
42
42
func TestCollectorStartAsGoRoutine (t * testing.T ) {
43
- factories , err := componenttest .NopFactories ()
43
+ factories , err := servicetest .NopFactories ()
44
44
require .NoError (t , err )
45
45
46
46
cfgProvider , err := NewConfigProvider (newDefaultConfigProviderSettings ([]string {filepath .Join ("testdata" , "otelcol-nop.yaml" )}))
@@ -67,7 +67,7 @@ func TestCollectorStartAsGoRoutine(t *testing.T) {
67
67
}
68
68
69
69
func TestCollectorCancelContext (t * testing.T ) {
70
- factories , err := componenttest .NopFactories ()
70
+ factories , err := servicetest .NopFactories ()
71
71
require .NoError (t , err )
72
72
73
73
cfgProvider , err := NewConfigProvider (newDefaultConfigProviderSettings ([]string {filepath .Join ("testdata" , "otelcol-nop.yaml" )}))
@@ -103,7 +103,7 @@ func (p mockCfgProvider) Watch() <-chan error {
103
103
}
104
104
105
105
func TestCollectorStateAfterConfigChange (t * testing.T ) {
106
- factories , err := componenttest .NopFactories ()
106
+ factories , err := servicetest .NopFactories ()
107
107
require .NoError (t , err )
108
108
109
109
provider , err := NewConfigProvider (newDefaultConfigProviderSettings ([]string {filepath .Join ("testdata" , "otelcol-nop.yaml" )}))
@@ -136,7 +136,7 @@ func TestCollectorStateAfterConfigChange(t *testing.T) {
136
136
}
137
137
138
138
func TestCollectorReportError (t * testing.T ) {
139
- factories , err := componenttest .NopFactories ()
139
+ factories , err := servicetest .NopFactories ()
140
140
require .NoError (t , err )
141
141
142
142
cfgProvider , err := NewConfigProvider (newDefaultConfigProviderSettings ([]string {filepath .Join ("testdata" , "otelcol-nop.yaml" )}))
@@ -162,7 +162,7 @@ func TestCollectorReportError(t *testing.T) {
162
162
}
163
163
164
164
func TestCollectorSendSignal (t * testing.T ) {
165
- factories , err := componenttest .NopFactories ()
165
+ factories , err := servicetest .NopFactories ()
166
166
require .NoError (t , err )
167
167
168
168
cfgProvider , err := NewConfigProvider (newDefaultConfigProviderSettings ([]string {filepath .Join ("testdata" , "otelcol-nop.yaml" )}))
@@ -195,7 +195,7 @@ func TestCollectorSendSignal(t *testing.T) {
195
195
196
196
func TestCollectorFailedShutdown (t * testing.T ) {
197
197
t .Skip ("This test was using telemetry shutdown failure, switch to use a component that errors on shutdown." )
198
- factories , err := componenttest .NopFactories ()
198
+ factories , err := servicetest .NopFactories ()
199
199
require .NoError (t , err )
200
200
201
201
cfgProvider , err := NewConfigProvider (newDefaultConfigProviderSettings ([]string {filepath .Join ("testdata" , "otelcol-nop.yaml" )}))
@@ -226,7 +226,7 @@ func TestCollectorFailedShutdown(t *testing.T) {
226
226
}
227
227
228
228
func TestCollectorStartInvalidConfig (t * testing.T ) {
229
- factories , err := componenttest .NopFactories ()
229
+ factories , err := servicetest .NopFactories ()
230
230
require .NoError (t , err )
231
231
232
232
cfgProvider , err := NewConfigProvider (newDefaultConfigProviderSettings ([]string {filepath .Join ("testdata" , "otelcol-invalid.yaml" )}))
@@ -253,7 +253,7 @@ func TestCollectorStartWithTraceContextPropagation(t *testing.T) {
253
253
254
254
for _ , tt := range tests {
255
255
t .Run (tt .file , func (t * testing.T ) {
256
- factories , err := componenttest .NopFactories ()
256
+ factories , err := servicetest .NopFactories ()
257
257
require .NoError (t , err )
258
258
259
259
cfgProvider , err := NewConfigProvider (newDefaultConfigProviderSettings ([]string {filepath .Join ("testdata" , tt .file )}))
@@ -291,7 +291,7 @@ func TestCollectorRun(t *testing.T) {
291
291
292
292
for _ , tt := range tests {
293
293
t .Run (tt .file , func (t * testing.T ) {
294
- factories , err := componenttest .NopFactories ()
294
+ factories , err := servicetest .NopFactories ()
295
295
require .NoError (t , err )
296
296
297
297
cfgProvider , err := NewConfigProvider (newDefaultConfigProviderSettings ([]string {filepath .Join ("testdata" , tt .file )}))
@@ -315,7 +315,7 @@ func TestCollectorRun(t *testing.T) {
315
315
}
316
316
317
317
func TestCollectorShutdownBeforeRun (t * testing.T ) {
318
- factories , err := componenttest .NopFactories ()
318
+ factories , err := servicetest .NopFactories ()
319
319
require .NoError (t , err )
320
320
321
321
cfgProvider , err := NewConfigProvider (newDefaultConfigProviderSettings ([]string {filepath .Join ("testdata" , "otelcol-nop.yaml" )}))
@@ -340,7 +340,7 @@ func TestCollectorShutdownBeforeRun(t *testing.T) {
340
340
}
341
341
342
342
func TestCollectorClosedStateOnStartUpError (t * testing.T ) {
343
- factories , err := componenttest .NopFactories ()
343
+ factories , err := servicetest .NopFactories ()
344
344
require .NoError (t , err )
345
345
346
346
cfgProvider , err := NewConfigProvider (newDefaultConfigProviderSettings ([]string {filepath .Join ("testdata" , "otelcol-invalid.yaml" )}))
0 commit comments