Skip to content

Commit

Permalink
Monitor_dependency (#34803)
Browse files Browse the repository at this point in the history
* fixed

* upodate

* update

* update
  • Loading branch information
mcgallan authored Mar 21, 2023
1 parent a9a133a commit 7a71a00
Show file tree
Hide file tree
Showing 14 changed files with 1,201 additions and 658 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<ItemGroup>
<ProjectReference Include="..\src\Azure.ResourceManager.Monitor.csproj" />
<PackageReference Include="Azure.ResourceManager.Storage" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
using NUnit.Framework;
using Azure.Core;
using System;
using Azure.ResourceManager.Storage;
using Azure.ResourceManager.Storage.Models;

namespace Azure.ResourceManager.Monitor.Tests
{
Expand Down Expand Up @@ -288,11 +290,11 @@ public static void AssertMetricAlert(MetricAlertData data1, MetricAlertData data
Assert.AreEqual(data1.Description, data2.Description);
}

public static MetricAlertData GetBasicMetricAlertData(AzureLocation location, ActionGroupResource actionGroup)
public static MetricAlertData GetBasicMetricAlertData(AzureLocation location, ActionGroupResource actionGroup, string storageAccountId)
{
IEnumerable<string> scopes = new List<string>()
{
"/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/deleteme0309/providers/Microsoft.Storage/storageAccounts/metricalerttest",
storageAccountId,
// "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/deleteme0122/providers/Microsoft.Compute/virtualMachines/MetricAlertActionTestVM02"
};
var metricAlertAction = new MetricAlertAction()
Expand All @@ -312,5 +314,23 @@ public static MetricAlertData GetBasicMetricAlertData(AzureLocation location, Ac
{ Actions = { metricAlertAction } };
}
#endregion

#region storage account
public static StorageAccountData GetStorageAccountData()
{
var data = new StorageAccountData(AzureLocation.EastUS)
{
};
return data;
}
public static StorageAccountCreateOrUpdateContent GetContent()
{
var content = new StorageAccountCreateOrUpdateContent(new StorageSku(StorageSkuName.StandardLrs), StorageKind.BlobStorage, AzureLocation.EastUS)
{
AccessTier = StorageAccountAccessTier.Hot
};
return content;
}
#endregion
}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 7a71a00

Please sign in to comment.