test(playwright): add external-system/notification-list/shared-script CLI helpers (Wave 3 foundation)
This commit is contained in:
+54
@@ -111,4 +111,58 @@ public class CliRunnerHelpersTests
|
||||
await CliRunner.DeleteAreaAsync(areaId);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A freshly created external system is discoverable by name prefix and is cleanly
|
||||
/// deleted in teardown, exercising <see cref="CliRunner.CreateExternalSystemAsync"/>,
|
||||
/// <see cref="CliRunner.ListExternalSystemIdsByNamePrefixAsync"/>, and
|
||||
/// <see cref="CliRunner.DeleteExternalSystemAsync"/> as a round-trip.
|
||||
/// </summary>
|
||||
[SkippableFact]
|
||||
public async Task CreateThenDeleteExternalSystem_RoundTrips()
|
||||
{
|
||||
Skip.IfNot(await ClusterAvailability.IsAvailableAsync(), ClusterAvailability.SkipReason);
|
||||
var name = CliRunner.UniqueName("extsys");
|
||||
var id = await CliRunner.CreateExternalSystemAsync(name);
|
||||
try
|
||||
{
|
||||
Assert.True(id > 0);
|
||||
Assert.Contains(id, await CliRunner.ListExternalSystemIdsByNamePrefixAsync(name));
|
||||
}
|
||||
finally { await CliRunner.DeleteExternalSystemAsync(id); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A freshly created notification list is discoverable by name prefix and is cleanly
|
||||
/// deleted in teardown, exercising <see cref="CliRunner.CreateNotificationListAsync"/>,
|
||||
/// <see cref="CliRunner.ListNotificationListIdsByNamePrefixAsync"/>, and
|
||||
/// <see cref="CliRunner.DeleteNotificationListAsync"/> as a round-trip.
|
||||
/// </summary>
|
||||
[SkippableFact]
|
||||
public async Task CreateThenDeleteNotificationList_RoundTrips()
|
||||
{
|
||||
Skip.IfNot(await ClusterAvailability.IsAvailableAsync(), ClusterAvailability.SkipReason);
|
||||
var name = CliRunner.UniqueName("notiflist");
|
||||
var id = await CliRunner.CreateNotificationListAsync(name);
|
||||
try
|
||||
{
|
||||
Assert.True(id > 0);
|
||||
Assert.Contains(id, await CliRunner.ListNotificationListIdsByNamePrefixAsync(name));
|
||||
}
|
||||
finally { await CliRunner.DeleteNotificationListAsync(id); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A freshly created shared script returns a positive id and is cleanly deleted in
|
||||
/// teardown, exercising <see cref="CliRunner.CreateSharedScriptAsync"/> and
|
||||
/// <see cref="CliRunner.DeleteSharedScriptAsync"/> as a round-trip.
|
||||
/// </summary>
|
||||
[SkippableFact]
|
||||
public async Task CreateThenDeleteSharedScript_RoundTrips()
|
||||
{
|
||||
Skip.IfNot(await ClusterAvailability.IsAvailableAsync(), ClusterAvailability.SkipReason);
|
||||
var id = await CliRunner.CreateSharedScriptAsync(CliRunner.UniqueName("script"));
|
||||
try { Assert.True(id > 0); }
|
||||
finally { await CliRunner.DeleteSharedScriptAsync(id); }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user