in testworkflow.go [731:752]
func getTestResults(ctx context.Context, ts *TestWorkflow) ([]string, error) {
results := []string{}
createVMsStep, ok := ts.wf.Steps[createVMsStepName]
if ok {
for _, vm := range createVMsStep.CreateInstances.Instances {
out, err := utils.DownloadGCSObject(ctx, client, vm.Metadata["_test_results_url"])
if err != nil {
return nil, fmt.Errorf("failed to get results for test %s vm %s: %v", ts.Name, vm.Name, err)
}
results = append(results, string(out))
}
for _, vm := range createVMsStep.CreateInstances.InstancesBeta {
out, err := utils.DownloadGCSObject(ctx, client, vm.Metadata["_test_results_url"])
if err != nil {
return nil, fmt.Errorf("failed to get results for test %s vm %s: %v", ts.Name, vm.Name, err)
}
results = append(results, string(out))
}
}
return results, nil
}