Speed up runtime state refresh
This commit is contained in:
@@ -22,4 +22,21 @@ class GitRepositoryRuntimeInstrumentedTest {
|
||||
assertTrue(updatedRepo.initialized)
|
||||
assertTrue(level.validator(updatedRepo, "git init"))
|
||||
}
|
||||
|
||||
@Test
|
||||
fun nativeGitRuntimeCompletesConfigLevelOnDevice() {
|
||||
val context = InstrumentationRegistry.getInstrumentation().targetContext
|
||||
val runtime = GitRepositoryRuntime(context)
|
||||
val level = configLevel()
|
||||
|
||||
assertTrue(runtime.unavailableMessage(), runtime.isNativeGitAvailable())
|
||||
|
||||
val repo = runtime.prepareLevel(level)
|
||||
val (namedRepo, _) = runtime.execute(level, repo, "git config user.name GitHug")
|
||||
val (configuredRepo, _) = runtime.execute(level, namedRepo, "git config user.email githug@example.com")
|
||||
|
||||
assertTrue(configuredRepo.config["user.name"].orEmpty().isNotBlank())
|
||||
assertTrue(configuredRepo.config["user.email"].orEmpty().isNotBlank())
|
||||
assertTrue(level.validator(configuredRepo, "git config user.email githug@example.com"))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user