Skip to content

Commit

Permalink
Upgrade Azure.ResourceManager to 1.9.0 (#39934)
Browse files Browse the repository at this point in the history
  • Loading branch information
ArthurMa1978 authored Nov 16, 2023
1 parent 5aef41f commit 92d647b
Show file tree
Hide file tree
Showing 25 changed files with 372 additions and 331 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ public async Task SetUp()
}

[RecordedTest]
[Ignore("Restore after Azure.ResourceManager 1.9.0 get released.")]
public async Task ExistGetGetAll()
{
// GetAll
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ public DevTestLabArtifactSourceTests(bool isAsync) : base(isAsync)
}

[RecordedTest]
[Ignore("Restore after Azure.ResourceManager 1.9.0 get released.")]
public async Task ExistGetGetAll()
{
// GetAll
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ public async Task SetUp()
}

[RecordedTest]
[Ignore("Restore after Azure.ResourceManager 1.9.0 get released.")]
public async Task ExistGetGetAll()
{
// GetAll
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,33 +30,38 @@ public void SetUp()
}

[RecordedTest]
[Ignore("Restore after Azure.ResourceManager 1.9.0 get released.")]
public void CreateOrUpdate()
{
ValidateDevTestLab(TestDevTestLab.Data, _labName);
}

[RecordedTest]
[Ignore("Restore after Azure.ResourceManager 1.9.0 get released.")]
public async Task Exist()
{
var flag = await _devTestLabCollections.ExistsAsync(_labName);
Assert.IsTrue(flag);
}

[RecordedTest]
[Ignore("Restore after Azure.ResourceManager 1.9.0 get released.")]
public async Task Get()
{
var getlab = await _devTestLabCollections.GetAsync(_labName);
ValidateDevTestLab(getlab.Value.Data, _labName);
}

[RecordedTest]
[Ignore("Restore after Azure.ResourceManager 1.9.0 get released.")]
public async Task GetAll()
{
var first = (await _devTestLabCollections.GetAllAsync().ToEnumerableAsync()).FirstOrDefault();
ValidateDevTestLab(first.Data, _labName);
}

[RecordedTest]
[Ignore("Restore after Azure.ResourceManager 1.9.0 get released.")]
public async Task Delete()
{
await DeleteAllLocks(TestResourceGroup);
Expand All @@ -68,6 +73,7 @@ public async Task Delete()
[TestCase(null)]
[TestCase(false)]
[TestCase(true)]
[Ignore("Restore after Azure.ResourceManager 1.9.0 get released.")]
public async Task AddRemoveTag(bool? useTagResource)
{
SetTagResourceUsage(Client, useTagResource);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,33 +38,38 @@ public async Task SetUp()
}

[RecordedTest]
[Ignore("Restore after Azure.ResourceManager 1.9.0 get released.")]
public void CreateOrUpdate()
{
ValidateDevTestLabVirtualNetwork(_dtlVnet.Data, _dtlVnetName);
}

[RecordedTest]
[Ignore("Restore after Azure.ResourceManager 1.9.0 get released.")]
public async Task Exist()
{
var flag = await _dtlVnetCollection.ExistsAsync(_dtlVnetName);
Assert.IsTrue(flag);
}

[RecordedTest]
[Ignore("Restore after Azure.ResourceManager 1.9.0 get released.")]
public async Task Get()
{
var getdtlVnet = await _dtlVnetCollection.GetAsync(_dtlVnetName);
ValidateDevTestLabVirtualNetwork(getdtlVnet.Value.Data, _dtlVnetName);
}

[RecordedTest]
[Ignore("Restore after Azure.ResourceManager 1.9.0 get released.")]
public async Task GetAll()
{
var first = (await _dtlVnetCollection.GetAllAsync().ToEnumerableAsync()).FirstOrDefault();
ValidateDevTestLabVirtualNetwork(first.Data, _dtlVnetName);
}

[RecordedTest]
[Ignore("Restore after Azure.ResourceManager 1.9.0 get released.")]
public async Task Delete()
{
await _dtlVnet.DeleteAsync(WaitUntil.Completed);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ public BackupProtectionContainerTests(bool isAsnyc)
{
}

[Test]
[RecordedTest]
[Ignore("Restore after Azure.ResourceManager 1.9.0 get released.")]
public async Task CreateTest()
{
var sub = await Client.GetDefaultSubscriptionAsync();
Expand Down
12 changes: 5 additions & 7 deletions sdk/resourcemanager/Azure.ResourceManager/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
# Release History

## 1.9.0-beta.1 (Unreleased)
## 1.9.0 (2023-11-14)

### Features Added

### Breaking Changes
- Bump api-version of `Lock` to `2020-05-01`.

### Bugs Fixed

### Other Changes

## 1.8.1 (2023-11-13)
- Add the `Default` enum value back to `EnforcementMode`.

### Other Changes

Expand All @@ -32,8 +30,8 @@

### Other Changes

- Bump api-version of `Subscription` to `2022-12-01`
- Bump api-version of `Tenant` to `2022-12-01`
- Bump api-version of `Subscription` to `2022-12-01`.
- Bump api-version of `Tenant` to `2022-12-01`.

## 1.6.0 (2023-05-16)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1319,7 +1319,9 @@ internal DataPolicyManifestEffect() { }
private readonly object _dummy;
private readonly int _dummyPrimitive;
public EnforcementMode(string value) { throw null; }
public static Azure.ResourceManager.Resources.Models.EnforcementMode Default { get { throw null; } }
public static Azure.ResourceManager.Resources.Models.EnforcementMode DoNotEnforce { get { throw null; } }
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
public static Azure.ResourceManager.Resources.Models.EnforcementMode Enforced { get { throw null; } }
public bool Equals(Azure.ResourceManager.Resources.Models.EnforcementMode other) { throw null; }
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
Expand Down
2 changes: 1 addition & 1 deletion sdk/resourcemanager/Azure.ResourceManager/assets.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
"AssetsRepo": "Azure/azure-sdk-assets",
"AssetsRepoPrefixPath": "net",
"TagPrefix": "net/resourcemanager/Azure.ResourceManager",
"Tag": "net/resourcemanager/Azure.ResourceManager_bdcd46cf6b"
"Tag": "net/resourcemanager/Azure.ResourceManager_a6ac32475b"
}

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

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

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

Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<Version>1.9.0-beta.1</Version>
<Version>1.9.0</Version>
<!--The ApiCompatVersion is managed automatically and should not generally be modified manually.-->
<ApiCompatVersion>1.8.1</ApiCompatVersion>
<ApiCompatVersion>1.8.0</ApiCompatVersion>
<PackageId>Azure.ResourceManager</PackageId>
<Description>Microsoft Azure Resource Manager client SDK for Azure resources.</Description>
<PackageTags>azure;management;resource</PackageTags>
Expand Down

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

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

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

Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

#nullable disable

using System;
using System.ComponentModel;

namespace Azure.ResourceManager.Resources.Models
{
/// <summary> The policy assignment enforcement mode. Possible values are Default and DoNotEnforce. </summary>
public readonly partial struct EnforcementMode : IEquatable<EnforcementMode>
{
private const string EnforcedValue = "Default";

/// <summary> The policy effect is enforced during resource creation or update. </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
public static EnforcementMode Enforced { get; } = new EnforcementMode(EnforcedValue);
}
}
Loading

0 comments on commit 92d647b

Please sign in to comment.