@@ -919,7 +919,7 @@ func testAccResourcePoolDestroyed(s *terraform.State) error {
919919 resourcePoolsToDestroy = append (resourcePoolsToDestroy , resourcePoolId )
920920 }
921921
922- resourcePoolsResp , err := client .ListResourcePoolsExecute (ctx , testutil .ProjectId , testutil .Region )
922+ resourcePoolsResp , err := client .DefaultAPI . ListResourcePools (ctx , testutil .ProjectId , testutil .Region ). Execute ( )
923923 if err != nil {
924924 return fmt .Errorf ("getting resource pools: %w" , err )
925925 }
@@ -929,20 +929,20 @@ func testAccResourcePoolDestroyed(s *terraform.State) error {
929929 id := pool .Id
930930
931931 if utils .Contains (resourcePoolsToDestroy , * id ) {
932- shares , err := client .ListSharesExecute (ctx , testutil .ProjectId , testutil .Region , * id )
932+ shares , err := client .DefaultAPI . ListShares (ctx , testutil .ProjectId , testutil .Region , * id ). Execute ( )
933933 if err != nil {
934934 return fmt .Errorf ("cannot list shares: %w" , err )
935935 }
936936 if shares .Shares != nil {
937- for _ , share := range * shares .Shares {
938- _ , err := client .DeleteShareExecute (ctx , testutil .ProjectId , testutil .Region , * id , * share .Id )
937+ for _ , share := range shares .Shares {
938+ _ , err := client .DefaultAPI . DeleteShare (ctx , testutil .ProjectId , testutil .Region , * id , * share .Id ). Execute ( )
939939 if err != nil {
940940 return fmt .Errorf ("cannot delete share %q in pool %q: %w" , * share .Id , * id , err )
941941 }
942942 }
943943 }
944944
945- _ , err = client .DeleteResourcePool (ctx , testutil .ProjectId , testutil .Region , * id ).
945+ _ , err = client .DefaultAPI . DeleteResourcePool (ctx , testutil .ProjectId , testutil .Region , * id ).
946946 Execute ()
947947 if err != nil {
948948 return fmt .Errorf ("deleting resourcepool %s during CheckDestroy: %w" , * pool .Id , err )
0 commit comments