Skip to content

Commit

Permalink
Add Verification based on Model
Browse files Browse the repository at this point in the history
#161 non-breaking
  • Loading branch information
tthiery committed Apr 8, 2021
1 parent acf6f0b commit c035e63
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/SharpBrick.PoweredUp/Deployment/HubExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,18 @@ public static async Task VerifyDeploymentModelAsync(this Hub self, Action<Deploy

var model = BuildModel(configure);

await VerifyDeploymentModelAsync(self, model);
}

/// <summary>
/// Verifies the deployment model and waits till it reaches zero deployment errors.
/// </summary>
/// <param name="self"></param>
/// <param name="configure">Builder infrastructure for the deployment model</param>
/// <returns></returns>
public static async Task VerifyDeploymentModelAsync(this Hub self, DeploymentModel model)
{

var awaitable = self.VerifyObservable(model)
.Do(LogErrors(self))
.Where(x => x.Length == 0)
Expand Down

0 comments on commit c035e63

Please sign in to comment.