Skip to content

Commit

Permalink
start moving stuff around
Browse files Browse the repository at this point in the history
  • Loading branch information
BalduinLandolt committed Apr 3, 2024
1 parent 0cf9e43 commit 3d24d53
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 31 deletions.
35 changes: 34 additions & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ lazy val root: Project = Project(id = "root", file("."))
webapi,
sipi,
integration,
e2e,
)
.settings(
// values set for all sub-projects
Expand Down Expand Up @@ -287,7 +288,6 @@ lazy val integration: Project = Project(id = "integration", base = file("integra
Test / fork := true, // run tests in a forked JVM
Test / testForkedParallel := false,
Test / parallelExecution := false,
Test / javaOptions += "-Dkey=" + sys.props.getOrElse("key", "pekko"),
Test / testOptions += Tests.Argument("-oDF"), // show full stack traces and test case durations
libraryDependencies ++= Dependencies.webapiDependencies ++ Dependencies.webapiTestDependencies ++ Dependencies.integrationTestDependencies,
)
Expand All @@ -299,3 +299,36 @@ lazy val integration: Project = Project(id = "integration", base = file("integra
"Sonatype OSS Snapshots" at "https://oss.sonatype.org/content/repositories/snapshots",
),
)

//////////////////////////////////////
// E2E (./e2e)
//////////////////////////////////////

run / connectInput := true

lazy val e2e: Project = Project(id = "e2e", base = file("e2e"))
.dependsOn(webapi, sipi)
.settings(buildSettings)
.settings(
inConfig(Test) {
Defaults.testSettings ++ Defaults.testTasks ++ baseAssemblySettings ++ headerSettings(Test)
},
scalacOptions ++= customScalacOptions,
logLevel := Level.Info,
javaAgents += Dependencies.aspectjweaver,
Test / testFrameworks += new TestFramework("zio.test.sbt.ZTestFramework"),
Test / exportJars := false,
Test / fork := true, // run tests in a forked JVM
Test / testForkedParallel := false,
Test / parallelExecution := false,
Test / testOptions += Tests.Argument("-oDF"), // show full stack traces and test case durations
libraryDependencies ++= Dependencies.webapiDependencies ++ Dependencies.e2eTestDependencies,
)
.settings(LocalSettings.localScalacOptions: _*)
.enablePlugins(SbtTwirl, JavaAppPackaging, DockerPlugin, JavaAgent, BuildInfoPlugin, HeaderPlugin)
.settings(
name := "e2e",
resolvers ++= Seq(
"Sonatype OSS Snapshots" at "https://oss.sonatype.org/content/repositories/snapshots",
),
)
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,7 @@
package org.knora.webapi

import zio._
import zio.http._
import zio.json._
import zio.json.ast.Json
import zio.json.ast.JsonCursor
import zio.test._

import org.knora.webapi.core.AppServer
import org.knora.webapi.core.LayersTest
import org.knora.webapi.core.TestStartupUtils
import org.knora.webapi.messages.store.triplestoremessages.RdfDataObject
import zio.test.*

abstract class E2EZSpec extends ZIOSpecDefault with TestStartupUtils {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
package org.knora.webapi.e2ez
package org.knora.webapi

import zio.json._

import KnoraBaseJsonModels.ValuePrimitives._
import KnoraBaseJsonModels.ValueObjects._
import org.knora.webapi.KnoraBaseJsonModels.ValuePrimitives._
import org.knora.webapi.KnoraBaseJsonModels.ValueObjects._

object KnoraBaseJsonModels {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

package org.knora.webapi.e2ez

import zio.json._
import zio.test._

import org.knora.webapi.E2EZSpec
import org.knora.webapi.messages.store.triplestoremessages.RdfDataObject
package org.knora.webapi

object SampleE2ESpec extends E2EZSpec {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

package org.knora.webapi.e2ez

import zio._
import zio.json._
import zio.test._

import org.knora.webapi.E2EZSpec
import org.knora.webapi.messages.store.triplestoremessages.RdfDataObject
package org.knora.webapi

object SegmentE2EZSpec extends E2EZSpec {

Expand Down
2 changes: 2 additions & 0 deletions project/Dependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,8 @@ object Dependencies {

val webapiTestDependencies = Seq(zioTest, zioTestSbt, wiremock).map(_ % Test)

val e2eTestDependencies = Seq(zioTest, zioTestSbt).map(_ % Test)

val webapiDependencies = refined ++ Seq(
pekkoActor,
pekkoHttp,
Expand Down

0 comments on commit 3d24d53

Please sign in to comment.