-
Notifications
You must be signed in to change notification settings - Fork 1
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
#245 Add the ability to query REST endpoints from Reader module #297
base: master
Are you sure you want to change the base?
#245 Add the ability to query REST endpoints from Reader module #297
Conversation
* created new module Info * the new modul added to JaCoco and CI routines
* JaCoCo exclusion for model
* created Provider to query the data from server * support for Future, IO, and ZIO based providers * work in progress
* fixed license headers
JaCoCo model module code coverage report - scala 2.13.11
|
JaCoCo agent module code coverage report - scala 2.13.11
|
JaCoCo reader module code coverage report - scala 2.13.11
|
JaCoCo server module code coverage report - scala 2.13.11
|
|
||
protected def executeRequest[R](request: RequestT[Identity, RequestResult[R], Any]): F[Response[RequestResult[R]]] | ||
|
||
def getQuery[R: Decoder](endpointUri: String, params: Map[String, String] = Map.empty): F[RequestResult[R]] = { |
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.
Not sure about the return type of this key function. Particularly the error case. But it can be relatively easily adjusted in future.
val expected: Unit = () | ||
for { | ||
result <- connection.close() | ||
} yield assertTrue(result == expected) |
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.
There are plenly of built-in assertions in ZIO.
https://zio.dev/reference/test/assertions/
assertZIO(connection.close())(isUnit)
@@ -18,6 +18,8 @@ package za.co.absa.atum.reader | |||
|
|||
import org.scalatest.funsuite.AnyFunSuiteLike | |||
|
|||
import za.co.absa.atum.reader.server.future.ArmeriaServerConnection.serverConnection | |||
|
|||
class FlowReaderUnitTests extends AnyFunSuiteLike { | |||
test("foo") { | |||
val expected = new FlowReader().foo() |
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.
this is actual value, the expected one is "bar" (it's the other way around)
@@ -18,6 +18,8 @@ package za.co.absa.atum.reader | |||
|
|||
import org.scalatest.funsuite.AnyFunSuiteLike | |||
|
|||
import za.co.absa.atum.reader.server.future.ArmeriaServerConnection.serverConnection | |||
|
|||
class PartitioningReaderUnitTests extends AnyFunSuiteLike { | |||
test("foo") { | |||
val expected = new PartitioningReader().foo() |
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.
this is actual value, the expected one is "bar" (it's the other way around)
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.
Tests of intended usage of the library are missing. It would be useful to implement one actual operation (read some Atum data with GET call) against mocked http server. And then for each flavor of "Connection" demonstrate intended usage E2E.
This item depends on: |
…endpoints-from-info-module
GenericServerConnection
offering the ability to query the Atum serverREADME.md
updated to instruct how to use the Reader module and it's optional dependenciesGenericServerConnection.getQuery
GenericServerConnection.getQuery
, particularly the error caseCloses #245
Depends on #300
Release Notes: