Skip to content

Include user profile name in backup name #22

Include user profile name in backup name

Include user profile name in backup name #22

GitHub Actions / JUnit Test Report failed Feb 12, 2024 in 0s

438 tests run, 437 passed, 0 skipped, 1 failed.

Annotations

Check failure on line 101 in app/src/test/java/com/stevesoltys/seedvault/metadata/MetadataManagerTest.kt

See this annotation in the file changed.

@github-actions github-actions / JUnit Test Report

MetadataManagerTest.test onDeviceInitialization()

io.mockk.MockKException: no answer found for: Context(#105).checkSelfPermission(android.permission.QUERY_USERS)
Raw output
io.mockk.MockKException: no answer found for: Context(#105).checkSelfPermission(android.permission.QUERY_USERS)
	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:268)
	at io.mockk.impl.instantiation.JvmMockFactoryHelper$mockHandler$1.invocation(JvmMockFactoryHelper.kt:24)
	at app//io.mockk.proxy.jvm.advice.Interceptor.call(Interceptor.kt:21)
	at app//io.mockk.proxy.jvm.advice.BaseAdvice.handle(BaseAdvice.kt:42)
	at app//io.mockk.proxy.jvm.advice.jvm.JvmMockKProxyInterceptor.interceptNoSuper(JvmMockKProxyInterceptor.java:45)
	at android.content.Context$Subclass0.checkSelfPermission(Unknown Source)
	at com.stevesoltys.seedvault.metadata.MetadataManager.getUserName(MetadataManager.kt:292)
	at com.stevesoltys.seedvault.metadata.MetadataManager.access$getUserName(MetadataManager.kt:35)
	at com.stevesoltys.seedvault.metadata.MetadataManager$onDeviceInitialization$1.invoke(MetadataManager.kt:71)
	at com.stevesoltys.seedvault.metadata.MetadataManager$onDeviceInitialization$1.invoke(MetadataManager.kt:70)
	at com.stevesoltys.seedvault.metadata.MetadataManager.modifyMetadata(MetadataManager.kt:207)
	at com.stevesoltys.seedvault.metadata.MetadataManager.onDeviceInitialization(MetadataManager.kt:70)
	at com.stevesoltys.seedvault.metadata.MetadataManagerTest.test onDeviceInitialization()(MetadataManagerTest.kt:101)
	at [email protected]/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at [email protected]/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
	at [email protected]/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at [email protected]/java.lang.reflect.Method.invoke(Method.java:568)
	at app//org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
	at app//org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at app//org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
	at app//org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
	at app//org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
	at app//org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
	at app//org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
	at app//org.robolectric.RobolectricTestRunner$HelperTestRunner$1.evaluate(RobolectricTestRunner.java:589)
	at app//org.robolectric.internal.SandboxTestRunner$2.lambda$evaluate$2(SandboxTestRunner.java:290)
	at app//org.robolectric.internal.bytecode.Sandbox.lambda$runOnMainThread$0(Sandbox.java:99)
	at [email protected]/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at [email protected]/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at [email protected]/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at [email protected]/java.lang.Thread.run(Thread.java:840)
	Suppressed: org.robolectric.android.internal.AndroidTestEnvironment$UnExecutedRunnablesException: Main looper has queued unexecuted runnables. This might be the cause of the test failure. You might need a shadowOf(Looper.getMainLooper()).idle() call.