Skip to content
GitHub Actions / JUnit Tests failed Oct 9, 2024 in 0s

46 passed, 1 failed and 1 skipped

Tests failed

Report Passed Failed Skipped Time
target/surefire-reports/TEST-no.nb.mlt.wls.ArchitectureTest.xml 4✅ 2s
target/surefire-reports/TEST-no.nb.mlt.wls.domain.WLSServiceTest.xml 18✅ 1❌ 2s
target/surefire-reports/TEST-no.nb.mlt.wls.item.controller.ItemControllerTest.xml 4✅ 1⚪ 19s
target/surefire-reports/TEST-no.nb.mlt.wls.item.model.ItemModelConversionTest.xml 3✅ 7ms
target/surefire-reports/TEST-no.nb.mlt.wls.order.controller.OrderControllerTest.xml 13✅ 609ms
target/surefire-reports/TEST-no.nb.mlt.wls.order.model.OrderModelConversionTest.xml 4✅ 5ms

✅ target/surefire-reports/TEST-no.nb.mlt.wls.ArchitectureTest.xml

4 tests were completed in 2s with 4 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
no.nb.mlt.wls.ArchitectureTest 4✅ 2s

✅ no.nb.mlt.wls.ArchitectureTest

✅ The infrastructure packages does not access any application classes
✅ The domain model does not have any outgoing dependencies
✅ The application layer does not access any adapters
✅ A adapter should not access another adapter

❌ target/surefire-reports/TEST-no.nb.mlt.wls.domain.WLSServiceTest.xml

19 tests were completed in 2s with 18 passed, 1 failed and 0 skipped.

Test suite Passed Failed Skipped Time
no.nb.mlt.wls.domain.WLSServiceTest 18✅ 1❌ 2s

❌ no.nb.mlt.wls.domain.WLSServiceTest

✅ addItem should not save new item but return existing item if it already exists
✅ deleteOrder should fail when order does not exist in WLS database
✅ updateOrder should fail when order does not exist
✅ getItem should return requested item when it exists in DB
✅ deleteOrder should fail when order does not exist in storage system
✅ createOrder should return existing order when trying to create one with same id and host
✅ getItem should return null if item does not exist
✅ getOrder should return null when order does not exists in DB
❌ moveItem should return when item successfully moves
	io.mockk.MockKException: no answer found for: InventoryNotifier(#54).itemChanged(Item(hostId=12345, hostName=AXIELL, description=Tyven, tyven skal du hete, itemCategory=BOOK, preferredEnvironment=NONE, packaging=NONE, owner=NB, callbackUrl=https://callback.com/item, location=null, quantity=null))
✅ deleteOrder should complete when order exists
✅ moveItem throws when location is blank
✅ updateOrder should fail when items do not exist
✅ updateOrder with valid items should complete
✅ addItem should save and return new item when it does not exists
✅ moveItem should fail when item does not exist
✅ moveItem throws when count is invalid
✅ createOrder should fail if some of the items does not exist
✅ getOrder should return requested order when it exists in DB
✅ createOrder should save order in db and storage system

✅ target/surefire-reports/TEST-no.nb.mlt.wls.item.controller.ItemControllerTest.xml

5 tests were completed in 19s with 4 passed, 0 failed and 1 skipped.

Test suite Passed Failed Skipped Time
no.nb.mlt.wls.item.controller.ItemControllerTest 4✅ 1⚪ 19s

✅ no.nb.mlt.wls.item.controller.ItemControllerTest

✅ createItem with valid payload creates item
✅ createItem with duplicate payload returns OK
⚪ createItem where SynQ says it's a duplicate returns OK
✅ createItem handles SynQ error
✅ createItem payload with different data but same ID returns DB entry

✅ target/surefire-reports/TEST-no.nb.mlt.wls.item.model.ItemModelConversionTest.xml

3 tests were completed in 7ms with 3 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
no.nb.mlt.wls.item.model.ItemModelConversionTest 3✅ 7ms

✅ no.nb.mlt.wls.item.model.ItemModelConversionTest

✅ item converts to SynQ payload
✅ API payload converts to item
✅ item converts to API payload

✅ target/surefire-reports/TEST-no.nb.mlt.wls.order.controller.OrderControllerTest.xml

13 tests were completed in 609ms with 13 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
no.nb.mlt.wls.order.controller.OrderControllerTest 13✅ 609ms

✅ no.nb.mlt.wls.order.controller.OrderControllerTest

✅ deleteOrder with valid data deletes order
✅ createOrder with duplicate payload returns OK
✅ updateOrder when order is being processed errors
✅ createOrder payload with different data but same ID returns DB entry
✅ createOrder with valid payload creates order
✅ updateOrder with valid payload updates order
✅ getOrder returns the order
✅ getOrder for wrong client throws
✅ deleteOrder handles synq error
✅ createOrder where SynQ says it's a duplicate but we don't have it in the DB returns Server error
✅ createOrder handles SynQ error
✅ updateOrder when order lines doesn't exists returns status 400
✅ updateOrder when order does not exists returns status 404 NOT FOUND

✅ target/surefire-reports/TEST-no.nb.mlt.wls.order.model.OrderModelConversionTest.xml

4 tests were completed in 5ms with 4 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
no.nb.mlt.wls.order.model.OrderModelConversionTest 4✅ 5ms

✅ no.nb.mlt.wls.order.model.OrderModelConversionTest

✅ order converts to API payload
✅ API payload converts to order
✅ order converts to Mongo Order payload
✅ order converts to SynQ payload

Annotations

Check failure on line 75 in src/main/kotlin/no/nb/mlt/wls/domain/WLSService.kt

See this annotation in the file changed.

@github-actions github-actions / JUnit Tests

no.nb.mlt.wls.domain.WLSServiceTest ► moveItem should return when item successfully moves

Failed test found in:
  target/surefire-reports/TEST-no.nb.mlt.wls.domain.WLSServiceTest.xml
Error:
  io.mockk.MockKException: no answer found for: InventoryNotifier(#54).itemChanged(Item(hostId=12345, hostName=AXIELL, description=Tyven, tyven skal du hete, itemCategory=BOOK, preferredEnvironment=NONE, packaging=NONE, owner=NB, callbackUrl=https://callback.com/item, location=null, quantity=null))
Raw output
io.mockk.MockKException: no answer found for: InventoryNotifier(#54).itemChanged(Item(hostId=12345, hostName=AXIELL, description=Tyven, tyven skal du hete, itemCategory=BOOK, preferredEnvironment=NONE, packaging=NONE, owner=NB, callbackUrl=https://callback.com/item, location=null, quantity=null))
	at io.mockk.impl.stub.MockKStub.defaultAnswer(MockKStub.kt:90)
	at io.mockk.impl.stub.MockKStub.answer(MockKStub.kt:42)
	at io.mockk.impl.recording.states.AnsweringState.call(AnsweringState.kt:16)
	at io.mockk.impl.recording.CommonCallRecorder.call(CommonCallRecorder.kt:53)
	at io.mockk.impl.stub.MockKStub.handleInvocation(MockKStub.kt:263)
	at io.mockk.impl.instantiation.JvmMockFactoryHelper$mockHandler$1.invocation(JvmMockFactoryHelper.kt:25)
	at io.mockk.proxy.jvm.advice.Interceptor.call(Interceptor.kt:20)
	at io.mockk.proxy.jvm.advice.BaseAdvice.handle(BaseAdvice.kt:42)
	at io.mockk.proxy.jvm.advice.jvm.JvmMockKProxyInterceptor.interceptNoSuper(JvmMockKProxyInterceptor.java:45)
	at no.nb.mlt.wls.domain.ports.outbound.InventoryNotifier$Subclass3.itemChanged(Unknown Source)
	at no.nb.mlt.wls.domain.WLSService.moveItem(WLSService.kt:75)
	at no.nb.mlt.wls.domain.WLSServiceTest$moveItem should return when item successfully moves$3.invokeSuspend(WLSServiceTest.kt:139)
	at no.nb.mlt.wls.domain.WLSServiceTest$moveItem should return when item successfully moves$3.invoke(WLSServiceTest.kt)
	at no.nb.mlt.wls.domain.WLSServiceTest$moveItem should return when item successfully moves$3.invoke(WLSServiceTest.kt)
	at kotlinx.coroutines.test.TestBuildersKt__TestBuildersKt$runTest$2$1$1.invokeSuspend(TestBuilders.kt:314)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108)
	at kotlinx.coroutines.test.TestDispatcher.processEvent$kotlinx_coroutines_test(TestDispatcher.kt:28)
	at kotlinx.coroutines.test.TestCoroutineScheduler.tryRunNextTaskUnless$kotlinx_coroutines_test(TestCoroutineScheduler.kt:103)
	at kotlinx.coroutines.test.TestBuildersKt__TestBuildersKt$runTest$2$1$workRunner$1.invokeSuspend(TestBuilders.kt:320)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108)
	at kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.common.kt:280)
	at kotlinx.coroutines.BlockingCoroutine.joinBlocking(Builders.kt:85)
	at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(Builders.kt:59)
	at kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source)
	at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking$default(Builders.kt:38)
	at kotlinx.coroutines.BuildersKt.runBlocking$default(Unknown Source)
	at kotlinx.coroutines.test.TestBuildersJvmKt.createTestResult(TestBuildersJvm.kt:13)
	at kotlinx.coroutines.test.TestBuildersKt__TestBuildersKt.runTest-8Mi8wO0(TestBuilders.kt:308)
	at kotlinx.coroutines.test.TestBuildersKt.runTest-8Mi8wO0(Unknown Source)
	at kotlinx.coroutines.test.TestBuildersKt__TestBuildersKt.runTest-8Mi8wO0(TestBuilders.kt:166)
	at kotlinx.coroutines.test.TestBuildersKt.runTest-8Mi8wO0(Unknown Source)
	at kotlinx.coroutines.test.TestBuildersKt__TestBuildersKt.runTest-8Mi8wO0$default(TestBuilders.kt:158)
	at kotlinx.coroutines.test.TestBuildersKt.runTest-8Mi8wO0$default(Unknown Source)
	at no.nb.mlt.wls.domain.WLSServiceTest.moveItem should return when item successfully moves(WLSServiceTest.kt:138)
	at java.base/java.lang.reflect.Method.invoke(Method.java:580)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)