Skip to content

Commit

Permalink
Fix date format use in SearchApiDocValueFieldsTests (#4934) (#4945)
Browse files Browse the repository at this point in the history
Relates: elastic/elasticsearch#60044

This commit updates the SearchApiDocValueFieldsTests to use
a different date format.

Fixes #4920

Co-authored-by: Russ Cam <[email protected]>
  • Loading branch information
github-actions[bot] and russcam authored Aug 6, 2020
1 parent 1645715 commit c2cc733
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/Tests/Search/Search/SearchApiTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ public SearchApiDocValueFieldsTests(ReadOnlyCluster cluster, EndpointUsage usage
new
{
field = "lastActivity",
format = "weekyear"
format = DateFormat.basic_date
},
}
};
Expand All @@ -306,7 +306,7 @@ public SearchApiDocValueFieldsTests(ReadOnlyCluster cluster, EndpointUsage usage
)
.DocValueFields(fs => fs
.Field(p => p.Name)
.Field(p => p.LastActivity, format: "weekyear")
.Field(p => p.LastActivity, format: DateFormat.basic_date)
);

protected override SearchRequest<Project> Initializer => new SearchRequest<Project>()
Expand All @@ -324,7 +324,7 @@ public SearchApiDocValueFieldsTests(ReadOnlyCluster cluster, EndpointUsage usage
Value = "Stable"
}),
DocValueFields = Infer.Field<Project>(p => p.Name)
.And<Project>(p => p.LastActivity, format: "weekyear")
.And<Project>(p => p.LastActivity, format: DateFormat.basic_date)
};

protected override void ExpectResponse(ISearchResponse<Project> response)
Expand Down

0 comments on commit c2cc733

Please sign in to comment.