-
Notifications
You must be signed in to change notification settings - Fork 10
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
WIP: Api integration #135
base: master
Are you sure you want to change the base?
WIP: Api integration #135
Conversation
@@ -185,7 +186,7 @@ object Helpers { | |||
singleDsChecks = singleDsChecks |+| Map(customerDs -> List(expectedCustomerColumnsCheck)), | |||
dualDsChecks = dualDsMetricChecks, | |||
metricsPersister = esMetricsPersister, | |||
qcResultsRepository = qcResultsRepository | |||
qcResultsRepository = apiQcResultsRepository |
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.
Maybe make the example so it's easy to switch between the 2?
src/main/scala/com/github/timgent/dataflare/repository/DfApiQcResultsRepository.scala
Outdated
Show resolved
Hide resolved
src/main/scala/com/github/timgent/dataflare/repository/DfApiQcResultsRepository.scala
Outdated
Show resolved
Hide resolved
src/main/scala/com/github/timgent/dataflare/repository/DfApiQcResultsRepository.scala
Outdated
Show resolved
Hide resolved
src/main/scala/com/github/timgent/dataflare/repository/DfApiQcResultsRepository.scala
Outdated
Show resolved
Hide resolved
src/main/scala/com/github/timgent/dataflare/repository/DfApiQcResultsRepository.scala
Outdated
Show resolved
Hide resolved
with ScalaCheckDrivenPropertyChecks { | ||
|
||
"DfApiResultsRepository.save" should { | ||
def generateRawCheckResult(qcType: QcType, suffix: String, status: CheckStatus) = |
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.
Better name maybe?
def generateRawCheckResult(qcType: QcType, suffix: String, status: CheckStatus) = | ||
CheckResult(qcType, status, s"checkResult$suffix", SimpleCheckDescription(s"checkDescription$suffix")) | ||
|
||
val uri = uri"http://127.0.0.1:8080" |
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.
We should not post to a real endpoint in unit tests... unless we really want this to be an integration test
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.
You can test this one with some mocking API tool (e.g. RestAssured)
with EsTestUtils | ||
with ScalaCheckDrivenPropertyChecks { | ||
|
||
"DfApiResultsRepository.save" should { |
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.
Need to add some unhappy path tests for this too
A great feature. Well anticipated |
Needs some review and definitely error handling needs to be improved