Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions cmd/jaeger/internal/integration/e2e_integration.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ type E2EStorageIntegration struct {
// is the value of the environment variable to set.
// These variables are set upon initialization and are unset upon cleanup.
EnvVarOverrides map[string]string
// PropagateEnvVars contains a list of environment variables to propagate
// from the test process to the jaeger binary.
PropagateEnvVars []string
}

// e2eInitialize starts the Jaeger-v2 collector with the provided config file,
Expand Down Expand Up @@ -78,6 +81,11 @@ func (s *E2EStorageIntegration) e2eInitialize(t *testing.T, storage string) {
for key, value := range s.EnvVarOverrides {
envVars = append(envVars, fmt.Sprintf("%s=%s", key, value))
}
for _, key := range s.PropagateEnvVars {
if value, ok := os.LookupEnv(key); ok {
envVars = append(envVars, fmt.Sprintf("%s=%s", key, value))
}
}

cmd := Binary{
Name: s.BinaryName,
Expand Down
4 changes: 4 additions & 0 deletions cmd/jaeger/internal/integration/grpc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ func TestGRPCStorage(t *testing.T) {
StorageIntegration: integration.StorageIntegration{
CleanUp: purge,
},
PropagateEnvVars: []string{
"REMOTE_STORAGE_ENDPOINT",
"ARCHIVE_REMOTE_STORAGE_ENDPOINT",
},
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we need to add a var for writer endpoint

          endpoint: "${env:REMOTE_STORAGE_ENDPOINT:-localhost:17271}"
          tls:
            insecure: true
          writer:
            endpoint: 0.0.0.0:4316
            tls:
              insecure: true

}
collector.e2eInitialize(t, "grpc")
t.Log("Collector initialized")
Expand Down
Loading