Skip to content

Commit 3530838

Browse files
committed
Fix role mapping integration test
Both the built-in and custom source serializer will always serialize null values within the role mapping metadata
1 parent 570a626 commit 3530838

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/Tests/XPack/Security/RoleMapping/RoleMappingCrudTests.cs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -135,11 +135,7 @@ protected override void ExpectAfterCreate(IGetRoleMappingResponse response)
135135

136136
mapping.Enabled.Should().BeFalse();
137137
mapping.Roles.Should().BeEquivalentTo("admin");
138-
//source serializer includes nulls on deserialize
139-
if (TestClient.Configuration.UsingCustomSourceSerializer)
140-
mapping.Metadata.Should().HaveCount(2).And.ContainKeys("x", "z");
141-
else
142-
mapping.Metadata.Should().HaveCount(1).And.ContainKeys("x");
138+
mapping.Metadata.Should().HaveCount(2).And.ContainKeys("x", "z");
143139
mapping.Rules.Should().NotBeNull();
144140

145141
var allMapping = mapping.Rules as AllRoleMappingRule;

0 commit comments

Comments
 (0)