Skip to content

Commit

Permalink
change build again
Browse files Browse the repository at this point in the history
  • Loading branch information
pjfanning committed Aug 23, 2023
1 parent 326f006 commit 426c24f
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 21 deletions.
13 changes: 2 additions & 11 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,10 @@ val akkaStreamsTestkit = "com.typesafe.akka" %% "akka-stream-testkit" % akkaStre

val scalaTest = "org.scalatest" %% "scalatest" % "3.2.16" % "test"

lazy val akkaRootProject = (project in file("."))
.settings(commonSettings: _*)
.settings(publish / skip := true, name := "akka-http-session", scalaVersion := scala2_13)
.aggregate(core.projectRefs ++ jwt.projectRefs ++ example.projectRefs ++ javaTests.projectRefs: _*)

lazy val pekkoRootProject = (project in file("."))
.settings(pekkoCommonSettings: _*)
.settings(publish / skip := true, name := "pekko-http-session", scalaVersion := scala2_13)
.aggregate(pekkoCore.projectRefs ++ pekkoJwt.projectRefs ++ pekkoExample.projectRefs ++ pekkoJavaTests.projectRefs: _*)

lazy val rootProject = (project in file("."))
.settings(publish / skip := true, name := "akka-http-session-root", scalaVersion := scala2_13)
.aggregate(akkaRootProject, pekkoRootProject)
.aggregate(core.projectRefs ++ jwt.projectRefs ++ example.projectRefs ++ javaTests.projectRefs ++
pekkoCore.projectRefs ++ pekkoJwt.projectRefs ++ pekkoExample.projectRefs ++ pekkoJavaTests.projectRefs: _*)

lazy val core = (projectMatrix in file("core"))
.settings(commonSettings: _*)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class CsrfDirectivesTest extends AnyFlatSpec with ScalatestRouteTest with Matche
responseAs[String] should be("ok")

val csrfCookieOption = header[`Set-Cookie`]
csrfCookieOption should be('defined)
csrfCookieOption shouldBe defined
val Some(csrfCookie) = csrfCookieOption

csrfCookie.cookie.name should be(cookieName)
Expand Down
8 changes: 4 additions & 4 deletions core/src/test/scala/com/softwaremill/session/OneOffTest.scala
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class OneOffTest extends AnyFlatSpec with ScalatestRouteTest with Matchers with
"Using cookies" should "set the correct session cookie name" in {
Get("/set") ~> createRoutes(TestUsingCookies) ~> check {
val sessionCookieOption = header[`Set-Cookie`]
sessionCookieOption should be('defined)
sessionCookieOption shouldBe defined
val Some(sessionCookie) = sessionCookieOption

sessionCookie.cookie.name should be(TestUsingCookies.sessionCookieName)
Expand All @@ -71,7 +71,7 @@ class OneOffTest extends AnyFlatSpec with ScalatestRouteTest with Matchers with
responseAs[String] should be("ok")

val sessionOption = using.getSession
sessionOption should be('defined)
sessionOption shouldBe defined

using.isSessionExpired should be(false)
}
Expand Down Expand Up @@ -188,7 +188,7 @@ class OneOffTest extends AnyFlatSpec with ScalatestRouteTest with Matchers with
val legacySession = Legacy.encodeV0_5_1(data, now, sessionConfig)

Get("/getReq") ~> addHeader(using.setSessionHeader(legacySession)) ~> routes(manager_tokenMigrationFromV0_5_1) ~> check {
using.getSession should be('defined)
using.getSession shouldBe defined
responseAs[String] should be(data.toString)
}
}
Expand All @@ -213,7 +213,7 @@ class OneOffTest extends AnyFlatSpec with ScalatestRouteTest with Matchers with
val legacySession = Legacy.encodeV0_5_2(data, now, sessionConfig)

Get("/getReq") ~> addHeader(using.setSessionHeader(legacySession)) ~> routes(manager_tokenMigrationFromV0_5_2) ~> check {
using.getSession should be('defined)
using.getSession shouldBe defined
responseAs[String] should be(data.toString)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@ class RefreshableTest extends AnyFlatSpec with ScalatestRouteTest with Matchers
Get("/set") ~> routes ~> check {
responseAs[String] should be("ok")

using.getSession should be('defined)
using.getSession shouldBe defined
using.countSessionHeaders should be(1)
using.getRefreshToken should be('defined)
using.getRefreshToken shouldBe defined
using.countRefreshTokenHeaders should be(1)
}
}
Expand Down Expand Up @@ -120,7 +120,7 @@ class RefreshableTest extends AnyFlatSpec with ScalatestRouteTest with Matchers
Get("/set") ~> routes ~> check {
val Some(token1) = using.getRefreshToken
val session1 = using.getSession
session1 should be('defined)
session1 shouldBe defined

Get("/getOpt") ~>
addHeader(using.setRefreshTokenHeader(token1)) ~>
Expand All @@ -129,7 +129,7 @@ class RefreshableTest extends AnyFlatSpec with ScalatestRouteTest with Matchers
using.countSessionHeaders should be(1)
using.countRefreshTokenHeaders should be(1)
val session2 = using.getSession
session2 should be('defined)
session2 shouldBe defined
session2 should not be (session1)
}
}
Expand Down Expand Up @@ -275,7 +275,7 @@ class RefreshableTest extends AnyFlatSpec with ScalatestRouteTest with Matchers

// new token should be generated
session1 should not be (session3)
token3Opt should be('defined)
token3Opt shouldBe defined
}
}
}
Expand Down

0 comments on commit 426c24f

Please sign in to comment.