Skip to content

Commit 98bf770

Browse files
committed
fix failing codestandards tests after implementing xpack security 5.5 new features
1 parent 6fb0c10 commit 98bf770

File tree

4 files changed

+8
-3
lines changed

4 files changed

+8
-3
lines changed

src/Nest/XPack/Security/RoleMapping/Rules/Role/RoleMappingRuleDescriptor.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
namespace Nest
55
{
6-
public class RoleMappingRuleDescriptor
6+
public class RoleMappingRuleDescriptor : DescriptorBase<RoleMappingRuleDescriptor, IDescriptor>, IDescriptor
77
{
88
public RoleMappingRuleBase DistinguishedName(string name) => new DistinguishedNameRule(name);
99

@@ -25,5 +25,6 @@ public RoleMappingRuleBase All(Func<RoleMappingRulesDescriptor, IPromise<List<Ro
2525

2626
public RoleMappingRuleBase Except(Func<RoleMappingRuleDescriptor, RoleMappingRuleBase> selector) =>
2727
new ExceptRoleMappingRole(selector?.Invoke(new RoleMappingRuleDescriptor()));
28+
2829
}
2930
}

src/Nest/XPack/Security/RoleMapping/Rules/Role/RoleMappingRulesDescriptor.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,13 @@
33

44
namespace Nest
55
{
6-
public class RoleMappingRulesDescriptor : IPromise<List<RoleMappingRuleBase>>
6+
public class RoleMappingRulesDescriptor :
7+
DescriptorPromiseBase<RoleMappingRulesDescriptor, List<RoleMappingRuleBase>>, IPromise<List<RoleMappingRuleBase>>
78
{
89
List<RoleMappingRuleBase> IPromise<List<RoleMappingRuleBase>>.Value { get; } = new List<RoleMappingRuleBase>();
910

11+
public RoleMappingRulesDescriptor() : base(new List<RoleMappingRuleBase>()) { }
12+
1013
private IPromise<List<RoleMappingRuleBase>> Self => this;
1114

1215
private RoleMappingRulesDescriptor Add(RoleMappingRuleBase m)

src/Tests/CodeStandards/Descriptors.doc.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ where t.IsClass() && typeof(IDescriptor).IsAssignableFrom(t)
4949
{ typeof(TransformDescriptor), typeof(TransformContainer) },
5050
{ typeof(SmoothingModelContainerDescriptor), typeof(SmoothingModelContainer) },
5151
{ typeof(InputDescriptor), typeof(InputContainer) },
52+
{ typeof(RoleMappingRuleDescriptor), typeof(RoleMappingRuleBase) },
5253
{ typeof(FluentDictionary<,>), typeof(FluentDictionary<,>) }
5354
};
5455

src/Tests/tests.default.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# tracked by git).
66

77
# mode either u (unit test), i (integration test) or m (mixed mode)
8-
mode: i
8+
mode: u
99
# the elasticsearch version that should be started
1010
# Can be a snapshot version of sonatype or "latest" to get the latest snapshot of sonatype
1111
elasticsearch_version: 5.5.0

0 commit comments

Comments
 (0)