Skip to content

Commit 3d888f7

Browse files
committed
fix shield clearcached* related api's
since they no longer return status on the nodes, or report back per node if the realm is not found
1 parent 0a9d428 commit 3d888f7

File tree

3 files changed

+2
-12
lines changed

3 files changed

+2
-12
lines changed

src/Nest/XPack/Shield/ShieldNode.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,5 @@ public class ShieldNode
66
{
77
[JsonProperty("name")]
88
public string Name { get; set; }
9-
[JsonProperty("status")]
10-
public ShieldNodeStatus Status { get; set; }
119
}
12-
}
10+
}

src/Tests/XPack/Security/ClearCachedRealms/ClearCachedRealmsApiTests.cs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ protected override LazyResponses ClientUsage() => Calls(
3333
protected override bool SupportsDeserialization => false;
3434

3535
//callisolated value can sometimes start with a digit which is not allowed for rolenames
36-
private string Realm => $"realm-{CallIsolatedValue}";
36+
private string Realm => $"default_file";
3737

3838
protected override ClearCachedRealmsRequest Initializer => new ClearCachedRealmsRequest(this.Realm);
3939

@@ -48,12 +48,6 @@ protected override void ExpectResponse(IClearCachedRealmsResponse response)
4848
var node = response.Nodes.First().Value;
4949
node.Should().NotBeNull();
5050
node.Name.Should().StartWith("shield-node-");
51-
node.Status.Should().NotBeNull();
52-
node.Status.Success.Should().BeFalse();
53-
node.Status.Type.Should().Be("failed_node_exception");
54-
node.Status.Reason.Should().Contain("Failed node");
55-
node.Status.CausedBy.Should().NotBeNull();
56-
node.Status.CausedBy.Reason.Should().Contain("could not find active realm");
5751
}
5852
}
5953

src/Tests/XPack/Security/Role/ClearCachedRoles/ClearCachedRolesApiTests.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,6 @@ protected override void ExpectResponse(IClearCachedRolesResponse response)
5353
var node = response.Nodes.First().Value;
5454
node.Should().NotBeNull();
5555
node.Name.Should().StartWith("shield-node-");
56-
node.Status.Should().NotBeNull();
57-
node.Status.Success.Should().BeTrue();
5856
}
5957
}
6058

0 commit comments

Comments
 (0)