flat-mouse-20634
03/29/2021, 8:01 AMvar resourceGroup = new ResourceGroup("mystaticsite");
var storageAccount = new StorageAccount("mysite", new StorageAccountArgs
{
ResourceGroupName = resourceGroup.Name,
EnableHttpsTrafficOnly = true,
Sku = new SkuArgs
{
Name = SkuName.Standard_LRS
},
AccessTier = AccessTier.Hot,
Kind = Kind.StorageV2,
});
PrimaryWebEndpoint = storageAccount.PrimaryEndpoints.Apply(x=>x.Web);
My test is trying to verify that the ResourceGroup was created
private static Task<ImmutableArray<Pulumi.Resource>> TestAsync()
{
return Pulumi.Deployment.TestAsync<WebsiteStack>(new Mocks(), new TestOptions {IsPreview = false});
}
[Fact]
public async Task ResourceGroup_ShouldExist()
{
var resources = await TestAsync();
var resourceGroups = resources.OfType<ResourceGroup>().ToList();
resourceGroups.Count.ShouldBe(1);
}
I couldn’t get the test to pass because I can’t find a way to mock EndpointsResponse
Are there a recommended way to handle this scenario?prehistoric-coat-10166
03/29/2021, 9:47 AMoutputs.Add("primaryEndpoints", new Dictionary<string, object?>()
{
{"blob", "BlobEndpoint"},
{"dfs", "DfsEndpoint"},
{"file", "FileEndpoint"},
{"internetEndpoints", null},
{"microsoftEndpoints", null},
{"queue", "QueueEndpoint"},
{"table", "TableEndpoint"},
{"web", "WebEndpoint"},
});
flat-mouse-20634
03/29/2021, 10:52 AM