Skip to content

Commit ea4930b

Browse files
committed
Fix test cases
1 parent d6cad06 commit ea4930b

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
@@ -62,6 +62,8 @@ class ContainerMessageConsumerTests
6262
implicit val transId = TransactionId.testing
6363
implicit val creationId = CreationId.generate()
6464

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

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

8794
private val schedulerHost = "127.17.0.1"
8895

8996
private val rpcPort = 13001
9097

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

0 commit comments

Comments
 (0)