Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
pkukielka committed Oct 16, 2024
1 parent a856cfd commit 48da69c
Showing 1 changed file with 4 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import com.intellij.testFramework.fixtures.BasePlatformTestCase
import com.intellij.testFramework.runInEdtAndWait
import com.sourcegraph.cody.agent.CodyAgentService
import com.sourcegraph.cody.agent.protocol_generated.ProtocolCodeLens
import com.sourcegraph.cody.auth.CodyPersistentAccountsHost
import com.sourcegraph.cody.auth.CodyAccount
import com.sourcegraph.cody.auth.SourcegraphServerPath
import com.sourcegraph.cody.edit.lenses.LensListener
import com.sourcegraph.cody.edit.lenses.LensesService
Expand Down Expand Up @@ -94,13 +94,9 @@ open class CodyIntegrationTextFixture : BasePlatformTestCase(), LensListener {
// change anything.
private fun initCredentialsAndAgent() {
val credentials = TestingCredentials.dotcom
CodyPersistentAccountsHost(project)
.addAccount(
SourcegraphServerPath.from(credentials.serverEndpoint, ""),
login = "test_user",
displayName = "Test User",
token = credentials.token ?: credentials.redactedToken,
id = "random-unique-testing-id-1337")
val account = CodyAccount(SourcegraphServerPath.from(credentials.serverEndpoint, ""))
account.storeToken(credentials.token ?: credentials.redactedToken,)
CodyAccount.setActiveAccount(account)

assertNotNull(
"Unable to start agent in a timely fashion!",
Expand Down

0 comments on commit 48da69c

Please sign in to comment.