From fbdbba08c159492342c82b329ffb8f07e1791da3 Mon Sep 17 00:00:00 2001 From: Zac Spitzer Date: Sat, 22 Jun 2024 13:19:10 +0200 Subject: [PATCH] add fall back on prod --- tests/testMavenMappings.cfc | 3 ++- tests/testStableReleaseBundles.cfc | 10 +++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/tests/testMavenMappings.cfc b/tests/testMavenMappings.cfc index 7e16e3f..03c52ac 100644 --- a/tests/testMavenMappings.cfc +++ b/tests/testMavenMappings.cfc @@ -21,9 +21,10 @@ component extends="org.lucee.cfml.test.LuceeTestCase" labels="data-provider-inte // systemOutput( "checking #mapping.toJson()#", true ); try { meta = mavenMatcher.getMatch( mapping, "latest" ); + systemOutput( mapping, true ); systemOutput( meta.toJson(), true ); } catch( e ) { - arrayAppend(missing, " #mapping# threw #e.message#, mapping: #mappings[mapping].toJson()# "); + arrayAppend(missing, " #mapping# threw #e.message##chr(10)#, mapping: #mappings[mapping].toJson()# "); } } if ( len( missing ) ){ diff --git a/tests/testStableReleaseBundles.cfc b/tests/testStableReleaseBundles.cfc index 274a927..a111731 100644 --- a/tests/testStableReleaseBundles.cfc +++ b/tests/testStableReleaseBundles.cfc @@ -57,6 +57,7 @@ component extends="org.lucee.cfml.test.LuceeTestCase" labels="data-provider-inte var mavenMatcher = new update.services.legacy.MavenMatcher(); // var BundleDownloadService = new services.BundleDownloadService(); // needs creds var missing = []; + var bundleSpec = ""; loop list=requiredBundles item="bundle" { // systemOutput( bundle, true ); @@ -66,7 +67,14 @@ component extends="org.lucee.cfml.test.LuceeTestCase" labels="data-provider-inte } catch ( e ){ //var st = new test._testRunner().trimJavaStackTrace( e.stacktrace ); //systemOutput( st, true ); - arrayAppend( missing, bundle ); + // see if the update provider can serve this bundle + try { + bundleSpec = listFirst( bundle,";" ) & "/" & listLast( listLast( bundle, ";" ), "=" ); + http url="https://update.lucee.org/rest/update/provider/download/#bundleSpec#/" result="local.res" throwOnError=true; + } catch ( e ) { + systemOutput( e.message, true ); + arrayAppend( missing, bundle ); + } } } if ( len( missing ) ){