Add upload pipeline integration coverage
This commit is contained in:
@@ -23,6 +23,13 @@ func main() {
|
||||
if len(os.Args) > 1 {
|
||||
bundleRoot = os.Args[1]
|
||||
}
|
||||
pipelineID := os.Getenv("DISTRIBUTOR_EXAMPLE_UPLOAD_PIPELINE_ID")
|
||||
if pipelineID == "" {
|
||||
pipelineID = "example-http-upload"
|
||||
}
|
||||
if len(os.Args) > 2 {
|
||||
pipelineID = os.Args[2]
|
||||
}
|
||||
idempotencyKey := os.Getenv("DISTRIBUTOR_EXAMPLE_UPLOAD_IDEMPOTENCY_KEY")
|
||||
|
||||
client, err := upload.NewClient(upload.ClientOptions{
|
||||
@@ -35,7 +42,10 @@ func main() {
|
||||
|
||||
ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second)
|
||||
defer cancel()
|
||||
opts := upload.UploadBundleOptions{Root: bundleRoot}
|
||||
opts := upload.UploadBundleOptions{
|
||||
PipelineID: pipelineID,
|
||||
Root: bundleRoot,
|
||||
}
|
||||
if idempotencyKey != "" {
|
||||
opts.IdempotencyKey = idempotencyKey
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user