Skip to content

Conversation

@timgent
Copy link
Owner

@timgent timgent commented Jul 6, 2021

Needs some review and definitely error handling needs to be improved

dualDsChecks = dualDsMetricChecks,
metricsPersister = esMetricsPersister,
qcResultsRepository = qcResultsRepository
qcResultsRepository = apiQcResultsRepository
Copy link
Owner Author

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?

with ScalaCheckDrivenPropertyChecks {

"DfApiResultsRepository.save" should {
def generateRawCheckResult(qcType: QcType, suffix: String, status: CheckStatus) =
Copy link
Owner Author

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"
Copy link
Owner Author

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

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 {
Copy link
Owner Author

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

@kingbrown9
Copy link

kingbrown9 commented May 9, 2022

A great feature. Well anticipated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants