Skip to content

Commit

Permalink
feat: Renku Core Client
Browse files Browse the repository at this point in the history
  • Loading branch information
jachro committed Aug 11, 2023
1 parent cda8ba7 commit d08a83c
Showing 1 changed file with 17 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,13 @@
package io.renku.core.client

import cats.effect.IO
import io.renku.generators.Generators.Implicits._
import io.renku.graph.model.GraphModelGenerators.{projectSchemaVersions, projectSlugs}
import io.renku.interpreters.TestLogger
import io.renku.stubbing.ExternalServiceStubbing
import io.renku.testtools.CustomAsyncIOSpec
import org.scalamock.scalatest.AsyncMockFactory
import com.github.tomakehurst.wiremock.client.WireMock._
import org.scalatest.matchers.should
import org.scalatest.wordspec.AsyncWordSpec
import org.scalatest.{EitherValues, OptionValues}
Expand All @@ -37,6 +40,20 @@ class RenkuCoreClientSpec
with ExternalServiceStubbing
with AsyncMockFactory {

"getMigrationCheck" should {

"return info about current project schema version" in {

val schemaVersion = projectSchemaVersions.generateOne
val projectSlug = projectSlugs.generateOne

stubFor {
get(s"/renku/cache.migrations_check").withQueryParam("git_url", )
.willReturn(ok(Result.success(versionTuples).asJson.spaces2))
}
}
}

private implicit val logger: Logger[IO] = TestLogger()
private val coreVersionClient = mock[RenkuCoreVersionClient[IO]]
private lazy val client = new RenkuCoreClientImpl[IO](RenkuCoreUri.Current(externalServiceBaseUri), coreVersionClient)
Expand Down

0 comments on commit d08a83c

Please sign in to comment.