Skip to content

Commit

Permalink
fix conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
ktiniatros committed Sep 28, 2021
1 parent 649f7ed commit c86d66b
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 deletions.
2 changes: 2 additions & 0 deletions holder/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ android {
"{" +
"\"sha256/lR7gRvqDMW5nhsCMRPE7TKLq0tJkTWMxQ5HAzHCIfQ0=\"" +
"}"
buildConfigField "String", "CDN_API_URL", "\"https://holder-api-cdn.coronacheck.nl/v5/\""
manifestPlaceholders = [appLabel: "@string/app_name", deepLinkHost: "coronacheck.nl", digidSchema: "coronacheck"]

javaCompileOptions {
Expand Down Expand Up @@ -96,6 +97,7 @@ android {
"{" +
"\"sha256/lR7gRvqDMW5nhsCMRPE7TKLq0tJkTWMxQ5HAzHCIfQ0=\"" +
"}"
buildConfigField "String", "CDN_API_URL", "\"https://holder-api-cdn.acc.coronacheck.nl/v5/\""
dimension "environment"
versionNameSuffix "-acc"
applicationIdSuffix ".acc"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ open class HolderApplication : SharedApplication(), Configuration.Provider {
BuildConfig.CERTIFICATE_PINS,
),
sharedModule,
appConfigModule("holder", BuildConfig.VERSION_CODE),
appConfigModule(BuildConfig.CDN_API_URL,"holder", BuildConfig.VERSION_CODE),
introductionModule,
*getAdditionalModules().toTypedArray(),
designModule
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,19 @@ package nl.rijksoverheid.ctr.holder
import com.squareup.moshi.Moshi
import kotlinx.coroutines.runBlocking
import nl.rijksoverheid.ctr.api.json.JsonObjectJsonAdapter
import nl.rijksoverheid.ctr.appconfig.AppConfigViewModel
import nl.rijksoverheid.ctr.appconfig.AppConfigViewModelImpl
import nl.rijksoverheid.ctr.appconfig.api.AppConfigApi
import nl.rijksoverheid.ctr.appconfig.appConfigModule
import nl.rijksoverheid.ctr.appconfig.isVerifierApp
import nl.rijksoverheid.ctr.appconfig.persistence.*
import nl.rijksoverheid.ctr.appconfig.repositories.ConfigRepository
import nl.rijksoverheid.ctr.appconfig.repositories.ConfigRepositoryImpl
import nl.rijksoverheid.ctr.appconfig.usecases.*
import okhttp3.CertificatePinner
import okhttp3.CertificatePinner.Companion.sha256Hash
import okhttp3.HttpUrl
import okhttp3.HttpUrl.Companion.toHttpUrl
import okhttp3.OkHttpClient
import okhttp3.mockwebserver.MockResponse
import okhttp3.mockwebserver.MockWebServer
Expand All @@ -15,7 +24,10 @@ import okhttp3.tls.HeldCertificate
import org.junit.Assert.assertThrows
import org.junit.Test
import org.junit.runner.RunWith
import org.koin.android.ext.koin.androidContext
import org.koin.androidx.viewmodel.dsl.viewModel
import org.koin.core.context.loadKoinModules
import org.koin.core.context.unloadKoinModules
import org.koin.dsl.module
import org.koin.test.AutoCloseKoinTest
import org.koin.test.get
Expand Down Expand Up @@ -57,7 +69,8 @@ class CertificatePinTest: AutoCloseKoinTest() {
setBody("{}")
})

loadKoinModules(apiModule(server.url("/")))
unloadKoinModules(appConfigModule(BuildConfig.CDN_API_URL, "holder", BuildConfig.VERSION_CODE))
loadKoinModules(listOf(apiModule(server.url("/")), appConfigModule(server.url("/").toString(), "holder", BuildConfig.VERSION_CODE)))

val configApi: AppConfigApi = get()

Expand Down Expand Up @@ -128,4 +141,4 @@ class CertificatePinTest: AutoCloseKoinTest() {
.add(JsonObjectJsonAdapter())
}
}
}
}

0 comments on commit c86d66b

Please sign in to comment.