From 2dba4c14d6688c5bd034450b848158360fbc3cca Mon Sep 17 00:00:00 2001 From: Ryan <69221034+ryfu-msft@users.noreply.github.com> Date: Wed, 1 May 2024 12:39:56 -0700 Subject: [PATCH] Make SecurityContext field name camelCase (#4433) (#4437) --- .../ConfigurationDynamicRuntimeFactory.cpp | 2 +- .../Tests/OpenConfigurationSetTests.cs | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/AppInstallerCLICore/ConfigurationDynamicRuntimeFactory.cpp b/src/AppInstallerCLICore/ConfigurationDynamicRuntimeFactory.cpp index f3ae3e1ce0..5bd590c9a8 100644 --- a/src/AppInstallerCLICore/ConfigurationDynamicRuntimeFactory.cpp +++ b/src/AppInstallerCLICore/ConfigurationDynamicRuntimeFactory.cpp @@ -99,7 +99,7 @@ namespace AppInstaller::CLI::ConfigurationRemoting // Support for 0.2 schema via metadata value // TODO: Support case insensitive lookup by iteration auto unitMetadata = unit.Metadata(); - auto securityContext = unitMetadata.TryLookup(L"SecurityContext"); + auto securityContext = unitMetadata.TryLookup(L"securityContext"); if (securityContext) { auto securityContextProperty = securityContext.try_as(); diff --git a/src/Microsoft.Management.Configuration.UnitTests/Tests/OpenConfigurationSetTests.cs b/src/Microsoft.Management.Configuration.UnitTests/Tests/OpenConfigurationSetTests.cs index db34cb2f05..04c9316f93 100644 --- a/src/Microsoft.Management.Configuration.UnitTests/Tests/OpenConfigurationSetTests.cs +++ b/src/Microsoft.Management.Configuration.UnitTests/Tests/OpenConfigurationSetTests.cs @@ -487,7 +487,7 @@ public void TestSet_Serialize_0_2() directives: description: FakeDescription allowPrerelease: true - SecurityContext: elevated + securityContext: elevated settings: TestString: Hello TestBool: false @@ -501,7 +501,7 @@ public void TestSet_Serialize_0_2() - dependency3 directives: description: FakeDescription2 - SecurityContext: elevated + securityContext: elevated settings: TestString: Bye TestBool: true @@ -529,14 +529,14 @@ public void TestSet_Serialize_0_2() Assert.Equal("FakeModule", set.Units[0].Type); Assert.Equal(ConfigurationUnitIntent.Assert, set.Units[0].Intent); Assert.Equal("TestId", set.Units[0].Identifier); - this.VerifyValueSet(set.Units[0].Metadata, new ("description", "FakeDescription"), new ("allowPrerelease", true), new ("SecurityContext", "elevated")); + this.VerifyValueSet(set.Units[0].Metadata, new ("description", "FakeDescription"), new ("allowPrerelease", true), new ("securityContext", "elevated")); this.VerifyValueSet(set.Units[0].Settings, new ("TestString", "Hello"), new ("TestBool", false), new ("TestInt", 1234)); Assert.Equal("FakeModule2", set.Units[1].Type); Assert.Equal(ConfigurationUnitIntent.Apply, set.Units[1].Intent); Assert.Equal("TestId2", set.Units[1].Identifier); this.VerifyStringArray(set.Units[1].Dependencies, "TestId", "dependency2", "dependency3"); - this.VerifyValueSet(set.Units[1].Metadata, new ("description", "FakeDescription2"), new ("SecurityContext", "elevated")); + this.VerifyValueSet(set.Units[1].Metadata, new ("description", "FakeDescription2"), new ("securityContext", "elevated")); ValueSet mapping = new ValueSet(); mapping.Add("Key", "TestValue");