Skip to content
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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

WIP: Api integration #135

wants to merge 4 commits into from

Conversation

timgent
Copy link
Owner

@timgent timgent commented Jul 6, 2021

Needs some review and definitely error handling needs to be improved

@@ -185,7 +186,7 @@ object Helpers {
singleDsChecks = singleDsChecks |+| Map(customerDs -> List(expectedCustomerColumnsCheck)),
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.

2 participants