File tree Expand file tree Collapse file tree 4 files changed +35
-3
lines changed
src/Nest/XPack/MachineLearning
tests/Tests/XPack/MachineLearning Expand file tree Collapse file tree 4 files changed +35
-3
lines changed Original file line number Diff line number Diff line change @@ -10,5 +10,13 @@ public class OpenJobResponse : ResponseBase
1010 {
1111 [ DataMember ( Name = "opened" ) ]
1212 public bool Opened { get ; internal set ; }
13+
14+ /// <summary>
15+ /// The node that the job was assigned to
16+ /// <para />
17+ /// Available in Elasticsearch 7.8.0+
18+ /// </summary>
19+ [ DataMember ( Name = "node" ) ]
20+ public string Node { get ; internal set ; }
1321 }
1422}
Original file line number Diff line number Diff line change @@ -10,5 +10,13 @@ public class StartDatafeedResponse : ResponseBase
1010 {
1111 [ DataMember ( Name = "started" ) ]
1212 public bool Started { get ; internal set ; }
13+
14+ /// <summary>
15+ /// The node that the job was assigned to
16+ /// <para />
17+ /// Available in Elasticsearch 7.8.0+
18+ /// </summary>
19+ [ DataMember ( Name = "node" ) ]
20+ public string Node { get ; internal set ; }
1321 }
1422}
Original file line number Diff line number Diff line change 66using Elasticsearch . Net ;
77using FluentAssertions ;
88using Nest ;
9+ using Tests . Core . Client ;
10+ using Tests . Core . Extensions ;
911using Tests . Framework . EndpointTests . TestState ;
1012
1113namespace Tests . XPack . MachineLearning . OpenJob
@@ -45,6 +47,12 @@ protected override LazyResponses ClientUsage() => Calls(
4547
4648 protected override OpenJobDescriptor NewDescriptor ( ) => new OpenJobDescriptor ( CallIsolatedValue ) ;
4749
48- protected override void ExpectResponse ( OpenJobResponse response ) => response . Opened . Should ( ) . BeTrue ( ) ;
50+ protected override void ExpectResponse ( OpenJobResponse response )
51+ {
52+ response . Opened . Should ( ) . BeTrue ( ) ;
53+
54+ if ( TestClient . Configuration . InRange ( ">=7.8.0" ) )
55+ response . Node . Should ( ) . NotBeNullOrEmpty ( ) ;
56+ }
4957 }
5058}
Original file line number Diff line number Diff line change 22// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
33// See the LICENSE file in the project root for more information
44
5- using System ;
5+ using System ;
66using Elasticsearch . Net ;
77using FluentAssertions ;
88using Nest ;
9+ using Tests . Core . Client ;
10+ using Tests . Core . Extensions ;
911using Tests . Framework . EndpointTests . TestState ;
1012
1113namespace Tests . XPack . MachineLearning . StartDatafeed
@@ -51,6 +53,12 @@ protected override LazyResponses ClientUsage() => Calls(
5153
5254 protected override StartDatafeedDescriptor NewDescriptor ( ) => new StartDatafeedDescriptor ( CallIsolatedValue + "-datafeed" ) ;
5355
54- protected override void ExpectResponse ( StartDatafeedResponse response ) => response . Started . Should ( ) . BeTrue ( ) ;
56+ protected override void ExpectResponse ( StartDatafeedResponse response )
57+ {
58+ response . Started . Should ( ) . BeTrue ( ) ;
59+
60+ if ( TestClient . Configuration . InRange ( ">=7.8.0" ) )
61+ response . Node . Should ( ) . NotBeNullOrEmpty ( ) ;
62+ }
5563 }
5664}
You can’t perform that action at this time.
0 commit comments