Skip to content

Commit

Permalink
add a test showing that unknown events are handled (#328)
Browse files Browse the repository at this point in the history
We want to make sure unknown events from the engine (e.g. events that
are newly added) don't break the use of the automation API in dotnet.
Add a test to verify just that.
  • Loading branch information
tgummerer authored Aug 28, 2024
1 parent 96e7181 commit 1c27825
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions sdk/Pulumi.Automation.Tests/EventLogWatcherTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,15 @@ await Assert.ThrowsAsync<MyException>(async () =>
});
}

[Fact]
public async Task IgnoresUnknownEvents()
{
using var fx = new Fixture();
await fx.Write("{\"unknown\": \"event\"}");
await fx.Watcher.Stop();
Assert.Equal(1, fx.EventCounter);
}

[Fact]
public async Task PermitsUserInitiatedCancellation()
{
Expand Down

0 comments on commit 1c27825

Please sign in to comment.