test(e2e): guard ApiSurfaceFixture partial-init delete + seal TransportImportTests (final review nits)
This commit is contained in:
@@ -28,7 +28,12 @@ public sealed class ApiSurfaceFixture : IAsyncLifetime
|
||||
}
|
||||
catch
|
||||
{
|
||||
await CliRunner.DeleteApiMethodAsync(MethodId);
|
||||
// Partial-init guard: MethodId is non-zero only if CreateApiMethodAsync succeeded,
|
||||
// so skip the delete when nothing was created (avoids a phantom delete --id 0).
|
||||
if (MethodId != 0)
|
||||
{
|
||||
await CliRunner.DeleteApiMethodAsync(MethodId);
|
||||
}
|
||||
Available = false;
|
||||
throw;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user