constellation create azure: use custom poller to check for scale set creation (#394)

Signed-off-by: Malte Poll <mp@edgeless.systems>
This commit is contained in:
Malte Poll 2022-08-24 11:31:43 +02:00 committed by GitHub
parent d1495e9285
commit f9c70d5c5a
6 changed files with 396 additions and 8 deletions

View file

@ -136,6 +136,16 @@ type stubScaleSetsAPI struct {
createErr error
stubResponse armcomputev2.VirtualMachineScaleSetsClientCreateOrUpdateResponse
pollErr error
getResponse armcomputev2.VirtualMachineScaleSet
getErr error
}
func (a stubScaleSetsAPI) Get(ctx context.Context, resourceGroupName string, vmScaleSetName string,
options *armcomputev2.VirtualMachineScaleSetsClientGetOptions,
) (armcomputev2.VirtualMachineScaleSetsClientGetResponse, error) {
return armcomputev2.VirtualMachineScaleSetsClientGetResponse{
VirtualMachineScaleSet: a.getResponse,
}, a.getErr
}
func (a stubScaleSetsAPI) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string,