diff --git a/webauthn-server-attestation/build.gradle.kts b/webauthn-server-attestation/build.gradle.kts index 8043777de..94f5a34a4 100644 --- a/webauthn-server-attestation/build.gradle.kts +++ b/webauthn-server-attestation/build.gradle.kts @@ -62,8 +62,9 @@ val integrationTest = task("integrationTest") { classpath = sourceSets["integrationTest"].runtimeClasspath shouldRunAfter(tasks.test) val mdsCacheDir = project.layout.buildDirectory.dir("fido-mds-cache").get().asFile - mdsCacheDir.mkdir() + mdsCacheDir.mkdirs() environment("FIDO_MDS_CACHE_DIR", mdsCacheDir.absolutePath) + inputs.dir(mdsCacheDir) } tasks["check"].dependsOn(integrationTest) diff --git a/webauthn-server-attestation/src/integrationTest/scala/com/yubico/fido/metadata/FidoMetadataDownloaderIntegrationTest.scala b/webauthn-server-attestation/src/integrationTest/scala/com/yubico/fido/metadata/FidoMetadataDownloaderIntegrationTest.scala index 6973fa40f..709efe57d 100644 --- a/webauthn-server-attestation/src/integrationTest/scala/com/yubico/fido/metadata/FidoMetadataDownloaderIntegrationTest.scala +++ b/webauthn-server-attestation/src/integrationTest/scala/com/yubico/fido/metadata/FidoMetadataDownloaderIntegrationTest.scala @@ -13,8 +13,6 @@ import org.scalatest.tags.Slow import org.scalatestplus.junit.JUnitRunner import scala.jdk.CollectionConverters.ListHasAsScala -import scala.util.Success -import scala.util.Try @Slow @Network @@ -28,16 +26,15 @@ class FidoMetadataDownloaderIntegrationTest val downloader = cachedDefaultSettingsDownloader.build() it("downloads and verifies the root cert and BLOB successfully.") { - val blob = Try(TestCaches.cacheSynchronized(downloader.loadCachedBlob)) - blob shouldBe a[Success[_]] - blob.get should not be null + val blob = TestCaches.cacheSynchronized(downloader.loadCachedBlob) + blob should not be null } it( "does not encounter any CRLDistributionPoints entries in unknown format." ) { - val blob = Try(TestCaches.cacheSynchronized(downloader.loadCachedBlob)) - blob shouldBe a[Success[_]] + val blob = TestCaches.cacheSynchronized(downloader.loadCachedBlob) + blob should not be null val trustRootCert = CertificateParser.parseDer( TestCaches.trustRootCache.get.getBytes @@ -86,9 +83,8 @@ class FidoMetadataDownloaderIntegrationTest .build() it("downloads and parses the BLOB successfully.") { - val blob = Try(TestCaches.cacheSynchronized(downloader.loadCachedBlob)) - blob shouldBe a[Success[_]] - blob.get should not be null + val blob = TestCaches.cacheSynchronized(downloader.loadCachedBlob) + blob should not be null } }