-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(tests): Restructure HttpElasticExecutorSpec #270
(tests): Restructure HttpElasticExecutorSpec #270
Conversation
modules/library/src/test/scala/zio/elasticsearch/HttpElasticExecutorSpec.scala
Outdated
Show resolved
Hide resolved
modules/library/src/test/scala/zio/elasticsearch/HttpElasticExecutorSpec.scala
Outdated
Show resolved
Hide resolved
equalTo( | ||
Map( | ||
"aggregation1" -> TermsAggregationResult( | ||
docErrorCount = 0, | ||
sumOtherDocCount = 0, | ||
buckets = Chunk(TermsAggregationBucketResult(docCount = 5, key = "name", subAggregations = Map.empty)) | ||
) | ||
) | ||
expectedTermsAggregationResult | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And this in one (not same).
assertZIO( | ||
Executor.execute(ElasticRequest.bulk(ElasticRequest.create(index, doc)).refreshTrue) | ||
executorBulk | ||
)( | ||
equalTo( | ||
BulkResponse( | ||
took = 3, | ||
errors = false, | ||
items = Chunk( | ||
CreateBulkResponse( | ||
index = "repositories", | ||
id = "123", | ||
version = Some(1), | ||
result = Some("created"), | ||
shards = Some(Shards(total = 1, successful = 1, failed = 0)), | ||
status = Some(201), | ||
error = None | ||
) | ||
) | ||
) | ||
expectedBulkResponse | ||
) | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Repeat same here.
assertZIO( | ||
executorCount | ||
)( | ||
equalTo( | ||
2 | ||
) | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same.
No description provided.