-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'tl_ID-1242_azure_private_container_registry_resource' o…
…f github.com:broadinstitute/sam into tl_ID-1242_azure_private_container_registry_resource
- Loading branch information
Showing
13 changed files
with
75 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/main/scala/org/broadinstitute/dsde/workbench/sam/config/OidcConfig.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
package org.broadinstitute.dsde.workbench.sam.config | ||
|
||
case class OidcConfig(authorityEndpoint: String, clientId: String, clientSecret: Option[String], legacyGoogleClientId: Option[String]) | ||
case class OidcConfig(authorityEndpoint: String, clientId: String) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,7 @@ import cats.effect.IO | |
import cats.effect.unsafe.implicits.{global => globalEc} | ||
import org.broadinstitute.dsde.workbench.model._ | ||
import org.broadinstitute.dsde.workbench.sam.Generator.{arbNonPetEmail => _, _} | ||
import org.broadinstitute.dsde.workbench.sam.TestSupport.{databaseEnabled, databaseEnabledClue} | ||
import org.broadinstitute.dsde.workbench.sam.TestSupport.{databaseEnabled, databaseEnabledClue, truncateAll} | ||
import org.broadinstitute.dsde.workbench.sam.dataAccess.{DirectoryDAO, PostgresDirectoryDAO} | ||
import org.broadinstitute.dsde.workbench.sam.google.GoogleExtensions | ||
import org.broadinstitute.dsde.workbench.sam.matchers.BeSameUserMatcher.beSameUserAs | ||
|
@@ -35,7 +35,7 @@ import scala.concurrent.duration._ | |
|
||
// TODO: continue breaking down old UserServiceSpec tests into nested suites | ||
// See: https://www.scalatest.org/scaladoc/3.2.3/org/scalatest/Suite.html | ||
class UserServiceSpec(_system: ActorSystem) extends TestKit(_system) with Suite with BeforeAndAfterAll { | ||
class UserServiceSpec(_system: ActorSystem) extends TestKit(_system) with Suite with BeforeAndAfterAll with BeforeAndAfterEach { | ||
override def nestedSuites: IndexedSeq[Suite] = | ||
IndexedSeq( | ||
new CreateUserSpec, | ||
|
@@ -54,6 +54,11 @@ class UserServiceSpec(_system: ActorSystem) extends TestKit(_system) with Suite | |
TestKit.shutdownActorSystem(system) | ||
super.afterAll() | ||
} | ||
|
||
override def beforeEach(): Unit = { | ||
truncateAll | ||
super.beforeEach() | ||
} | ||
} | ||
|
||
// This test suite is deprecated. It is still used and still has valid tests in it, but it should be broken out | ||
|
@@ -641,7 +646,7 @@ class OldUserServiceSpec(_system: ActorSystem) | |
implicit val arbEmail: Arbitrary[WorkbenchEmail] = Arbitrary(genEmail) | ||
|
||
forAll { email: WorkbenchEmail => | ||
assert(service.validateEmailAddress(email, Seq.empty).attempt.unsafeRunSync().isRight) | ||
assert(service.validateEmailAddress(email, Seq.empty, Seq.empty).attempt.unsafeRunSync().isRight) | ||
} | ||
} | ||
|
||
|
@@ -662,7 +667,7 @@ class OldUserServiceSpec(_system: ActorSystem) | |
implicit val arbEmail: Arbitrary[WorkbenchEmail] = Arbitrary(genEmail) | ||
|
||
forAll { email: WorkbenchEmail => | ||
assert(service.validateEmailAddress(email, Seq.empty).attempt.unsafeRunSync().isLeft) | ||
assert(service.validateEmailAddress(email, Seq.empty, Seq.empty).attempt.unsafeRunSync().isLeft) | ||
} | ||
} | ||
|
||
|
@@ -683,7 +688,7 @@ class OldUserServiceSpec(_system: ActorSystem) | |
implicit val arbEmail: Arbitrary[WorkbenchEmail] = Arbitrary(genEmail) | ||
|
||
forAll { email: WorkbenchEmail => | ||
assert(service.validateEmailAddress(email, Seq.empty).attempt.unsafeRunSync().isLeft) | ||
assert(service.validateEmailAddress(email, Seq.empty, Seq.empty).attempt.unsafeRunSync().isLeft) | ||
} | ||
} | ||
|
||
|
@@ -697,12 +702,17 @@ class OldUserServiceSpec(_system: ActorSystem) | |
implicit val arbEmail: Arbitrary[WorkbenchEmail] = Arbitrary(genEmail) | ||
|
||
forAll { email: WorkbenchEmail => | ||
assert(service.validateEmailAddress(email, Seq.empty).attempt.unsafeRunSync().isLeft) | ||
assert(service.validateEmailAddress(email, Seq.empty, Seq.empty).attempt.unsafeRunSync().isLeft) | ||
} | ||
} | ||
|
||
it should "reject blocked email domain" in { | ||
assert(service.validateEmailAddress(WorkbenchEmail("[email protected]"), Seq("bar.com")).attempt.unsafeRunSync().isLeft) | ||
assert(service.validateEmailAddress(WorkbenchEmail("[email protected]"), Seq("bar.com")).attempt.unsafeRunSync().isLeft) | ||
assert(service.validateEmailAddress(WorkbenchEmail("[email protected]"), Seq("bar.com"), Seq.empty).attempt.unsafeRunSync().isLeft) | ||
assert(service.validateEmailAddress(WorkbenchEmail("[email protected]"), Seq("bar.com"), Seq.empty).attempt.unsafeRunSync().isLeft) | ||
} | ||
|
||
it should "reject an un-invitable email domain" in { | ||
assert(service.validateEmailAddress(WorkbenchEmail("[email protected]"), Seq.empty, Seq("bar.com")).attempt.unsafeRunSync().isLeft) | ||
assert(service.validateEmailAddress(WorkbenchEmail("[email protected]"), Seq.empty, Seq("bar.com")).attempt.unsafeRunSync().isLeft) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters