This commit is contained in:
Bernie White 2022-11-23 15:50:24 +10:00 коммит произвёл GitHub
Родитель a2b9a88f69
Коммит bfab735350
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
5 изменённых файлов: 7 добавлений и 17 удалений

Просмотреть файл

@ -28,6 +28,9 @@ See [upgrade notes][1] for helpful information when upgrading from previous vers
- Azure Database for MariaDB:
- Check Azure Database for MariaDB servers, databases, firewall rules and VNET rules names meet naming requirements by @BenjaminEngeset.
[#1854](https://github.com/Azure/PSRule.Rules.Azure/issues/1854)
- Bug fixes:
- Fixed ref and name duplicated by @BernieWhite.
[#1876](https://github.com/Azure/PSRule.Rules.Azure/issues/1876)
## v1.22.0-B0062 (pre-release)

Просмотреть файл

@ -193,13 +193,15 @@ task TestDotNet {
if ($CodeCoverage) {
exec {
# Test library
dotnet test --collect:"Code Coverage" --logger trx -r (Join-Path $PWD -ChildPath reports/) tests/PSRule.Rules.Azure.Tests
# dotnet test --collect:"Code Coverage" --logger trx -r (Join-Path $PWD -ChildPath reports/) tests/PSRule.Rules.Azure.Tests
dotnet test tests/PSRule.Rules.Azure.Tests
}
}
else {
exec {
# Test library
dotnet test --logger trx -r (Join-Path $PWD -ChildPath reports/) tests/PSRule.Rules.Azure.Tests
# dotnet test --logger trx -r (Join-Path $PWD -ChildPath reports/) tests/PSRule.Rules.Azure.Tests
dotnet test tests/PSRule.Rules.Azure.Tests
}
}
}

Просмотреть файл

@ -19,7 +19,6 @@ namespace PSRule.Rules.Azure.Data.Policy
private const string KIND_VALUE = "Rule";
private const string PROPERTY_METADATA = "metadata";
private const string PROPERTY_NAME = "name";
private const string PROPERTY_REF = "ref";
private const string PROPERTY_SPEC = "spec";
private const string PROPERTY_CONDITION = "condition";
private const string PROPERTY_WHERE = "where";
@ -50,8 +49,6 @@ namespace PSRule.Rules.Azure.Data.Policy
writer.WriteStartObject();
writer.WritePropertyName(PROPERTY_NAME);
writer.WriteValue(definition.Name);
writer.WritePropertyName(PROPERTY_REF);
writer.WriteValue(definition.Name);
WriteTags(writer, definition);
WriteAnnotations(writer, definition);
writer.WriteEndObject();

Просмотреть файл

@ -5,7 +5,6 @@
"kind": "Rule",
"metadata": {
"name": "Azure.Policy.711b248c2a36",
"ref": "Azure.Policy.711b248c2a36",
"tags": {
"Azure.Policy/category": "Storage"
},
@ -38,7 +37,6 @@
"kind": "Rule",
"metadata": {
"name": "Azure.Policy.ed3cdd1a0b36",
"ref": "Azure.Policy.ed3cdd1a0b36",
"tags": {
"Azure.Policy/category": "Monitoring"
},
@ -341,7 +339,6 @@
"kind": "Rule",
"metadata": {
"name": "Azure.Policy.96bdb80b8c7b",
"ref": "Azure.Policy.96bdb80b8c7b",
"tags": {
"Azure.Policy/category": "App Service"
},
@ -403,7 +400,6 @@
"kind": "Rule",
"metadata": {
"name": "Azure.Policy.e561b2d6f013",
"ref": "Azure.Policy.e561b2d6f013",
"annotations": {
"Azure.Policy/id": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/policyDefinitions/00000000-0000-0000-0000-000000000000"
}
@ -432,7 +428,6 @@
"kind": "Rule",
"metadata": {
"name": "Azure.Policy.ae2444286cb0",
"ref": "Azure.Policy.ae2444286cb0",
"annotations": {
"Azure.Policy/id": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/policyDefinitions/00000000-0000-0000-0000-000000000000"
}
@ -461,7 +456,6 @@
"kind": "Rule",
"metadata": {
"name": "Azure.Policy.57d149e93fed",
"ref": "Azure.Policy.57d149e93fed",
"annotations": {
"Azure.Policy/id": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/policyDefinitions/00000000-0000-0000-0000-000000000000"
}
@ -490,7 +484,6 @@
"kind": "Rule",
"metadata": {
"name": "Azure.Policy.5c4e6dfa7d1d",
"ref": "Azure.Policy.5c4e6dfa7d1d",
"annotations": {
"Azure.Policy/id": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/policyDefinitions/00000000-0000-0000-0000-000000000000"
}
@ -512,7 +505,6 @@
"kind": "Rule",
"metadata": {
"name": "Azure.Policy.5a3cb5575682",
"ref": "Azure.Policy.5a3cb5575682",
"annotations": {
"Azure.Policy/id": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/policyDefinitions/00000000-0000-0000-0000-000000000000"
}
@ -572,7 +564,6 @@
"kind": "Rule",
"metadata": {
"name": "Azure.Policy.9c992e3a1370",
"ref": "Azure.Policy.9c992e3a1370",
"annotations": {
"Azure.Policy/id": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/policyDefinitions/00000000-0000-0000-0000-000000000000"
}
@ -625,7 +616,6 @@
"kind": "Rule",
"metadata": {
"name": "Azure.Policy.dcf8e21e0a26",
"ref": "Azure.Policy.dcf8e21e0a26",
"annotations": {
"Azure.Policy/id": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/policyDefinitions/00000000-0000-0000-0000-000000000000"
}
@ -658,7 +648,6 @@
"kind": "Rule",
"metadata": {
"name": "Azure.Policy.95078a87385b",
"ref": "Azure.Policy.95078a87385b",
"tags": {
"Azure.Policy/category": "Regulatory Compliance"
},

Просмотреть файл

@ -5,7 +5,6 @@
"kind": "Rule",
"metadata": {
"name": "AzureCustomPrefix.Policy.5ab09e70cb94",
"ref": "AzureCustomPrefix.Policy.5ab09e70cb94",
"tags": {
"Azure.Policy/category": "General"
},