Skip to content

Commit

Permalink
Make SecurityContext field name camelCase (#4433) (#4437)
Browse files Browse the repository at this point in the history
  • Loading branch information
ryfu-msft committed May 1, 2024
1 parent 17c5d44 commit 2dba4c1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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<IPropertyValue>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ public void TestSet_Serialize_0_2()
directives:
description: FakeDescription
allowPrerelease: true
SecurityContext: elevated
securityContext: elevated
settings:
TestString: Hello
TestBool: false
Expand All @@ -501,7 +501,7 @@ public void TestSet_Serialize_0_2()
- dependency3
directives:
description: FakeDescription2
SecurityContext: elevated
securityContext: elevated
settings:
TestString: Bye
TestBool: true
Expand Down Expand Up @@ -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");
Expand Down

0 comments on commit 2dba4c1

Please sign in to comment.