Fix error that occured in e2e test

This commit is contained in:
katexochen 2022-04-26 13:22:57 +02:00 committed by Paul Meyer
parent 1317fc2bb2
commit d5c7bb6078
3 changed files with 27 additions and 16 deletions

View file

@ -2,6 +2,7 @@ package client
import (
"context"
"errors"
"fmt"
computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
@ -12,6 +13,8 @@ import (
func (c *Client) waitForOperations(ctx context.Context, ops []Operation) error {
for _, op := range ops {
switch {
case op.Proto() == nil:
return errors.New("proto of operation is nil")
case op.Proto().Zone != nil:
if err := c.waitForZoneOperation(ctx, op); err != nil {
return err