Skip to content

Commit fa46215

Browse files
committed
Fix test cases
1 parent d0c9e8a commit fa46215

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

tests/src/test/scala/org/apache/openwhisk/core/invoker/test/ContainerMessageConsumerTests.scala

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ class ContainerMessageConsumerTests
6161
implicit val transId = TransactionId.testing
6262
implicit val creationId = CreationId.generate()
6363

64+
val authStore = WhiskAuthStore.datastore()
65+
6466
override def afterAll(): Unit = {
6567
TestKit.shutdownActorSystem(system)
6668
super.afterAll()
@@ -81,12 +83,21 @@ class ContainerMessageConsumerTests
8183
private val invokerInstance = InvokerInstanceId(0, userMemory = defaultUserMemory)
8284
private val schedulerInstanceId = SchedulerInstanceId("0")
8385

86+
/* Subject document needed for the second test */
8487
private val invocationNamespace = EntityName("invocationSpace")
88+
private val uuid = UUID()
89+
private val ak = BasicAuthenticationAuthKey(uuid, Secret())
90+
private val ns = Namespace(invocationNamespace, uuid)
91+
private val auth = WhiskAuth(Subject(), Set(WhiskNamespace(ns, ak)))
8592

8693
private val schedulerHost = "127.17.0.1"
8794

8895
private val rpcPort = 13001
8996

97+
override def beforeAll() = {
98+
put(authStore, auth)
99+
}
100+
90101
override def afterEach(): Unit = {
91102
cleanup()
92103
}

0 commit comments

Comments
 (0)