mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-03-22 15:19:59 +07:00
Fix Settings sync functional tests
1. Update settings sync server image to the latest 2. Fix authentication (use JBA-Id-Token) 3. Fix laf.xml is deleted when it's default GitOrigin-RevId: 971c94b31fd8fa3160dd63c25900f06a76da3632
This commit is contained in:
committed by
intellij-monorepo-bot
parent
432981c535
commit
383fa31722
@@ -0,0 +1,19 @@
|
||||
package com.intellij.settingsSync.auth
|
||||
|
||||
import com.intellij.ui.JBAccountInfoService
|
||||
import java.util.function.Consumer
|
||||
|
||||
object DummyJBAccountInfoService : JBAccountInfoService {
|
||||
|
||||
private val dummyUserData = JBAccountInfoService.JBAData("integrationTest", "testLogin", "testEmail@example.com")
|
||||
|
||||
override fun getUserData(): JBAccountInfoService.JBAData = dummyUserData
|
||||
|
||||
override fun getIdToken(): String {
|
||||
return "DUMMYTOKEN"
|
||||
}
|
||||
|
||||
override fun invokeJBALogin(userIdConsumer: Consumer<in String>?, onFailure: Runnable?) {
|
||||
TODO("Not yet implemented")
|
||||
}
|
||||
}
|
||||
@@ -21,7 +21,7 @@ internal class SettingsSyncDefaultAuthService : SettingsSyncAuthService {
|
||||
|
||||
override fun getUserData(): JBAccountInfoService.JBAData? {
|
||||
if (ApplicationManagerEx.isInIntegrationTest()) {
|
||||
return JBAccountInfoService.JBAData("integrationTest", "testLogin", "testEmail@example.com")
|
||||
return DummyJBAccountInfoService.userData
|
||||
}
|
||||
return getAccountInfoService()?.userData
|
||||
}
|
||||
@@ -50,6 +50,9 @@ internal class SettingsSyncDefaultAuthService : SettingsSyncAuthService {
|
||||
|
||||
// Extracted to simplify testing
|
||||
override fun getAccountInfoService(): JBAccountInfoService? {
|
||||
if (ApplicationManagerEx.isInIntegrationTest()) {
|
||||
return DummyJBAccountInfoService
|
||||
}
|
||||
return JBAccountInfoService.getInstance()
|
||||
}
|
||||
}
|
||||
@@ -26,7 +26,7 @@ services:
|
||||
exit 0;
|
||||
"
|
||||
cloud-config-server:
|
||||
image: registry.jetbrains.team/p/ij/test-containers/cloudconfig:529-12
|
||||
image: registry.jetbrains.team/p/ij/test-containers/cloudconfig:535-20
|
||||
depends_on:
|
||||
- minio-server
|
||||
environment:
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
package com.intellij.settingsSync
|
||||
|
||||
import com.intellij.settingsSync.auth.DummyJBAccountInfoService
|
||||
import com.intellij.settingsSync.auth.SettingsSyncAuthService
|
||||
import com.intellij.ui.JBAccountInfoService
|
||||
import java.util.function.Consumer
|
||||
|
||||
internal class SettingsSyncTestAuthService : SettingsSyncAuthService {
|
||||
override fun isLoggedIn(): Boolean {
|
||||
@@ -17,8 +19,8 @@ internal class SettingsSyncTestAuthService : SettingsSyncAuthService {
|
||||
else null
|
||||
}
|
||||
|
||||
override fun getAccountInfoService(): JBAccountInfoService? {
|
||||
return null
|
||||
override fun getAccountInfoService(): JBAccountInfoService {
|
||||
return DummyJBAccountInfoService
|
||||
}
|
||||
|
||||
override fun login() {
|
||||
|
||||
Reference in New Issue
Block a user