Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make SecurityContext field name camelCase #4433

Merged
merged 1 commit into from
May 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading