Skip to content

Commit

Permalink
ci: use a regex to verify resolved ref
Browse files Browse the repository at this point in the history
  • Loading branch information
consideRatio committed Jan 5, 2023
1 parent 4fcaac9 commit c286f3c
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions binderhub/tests/test_repoproviders.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import re
from unittest import TestCase
from urllib.parse import quote

Expand Down Expand Up @@ -166,19 +167,24 @@ async def test_hydroshare_doi():


@pytest.mark.parametrize(
# "10.7910/DVN/TJCLKP" is a DOI associated with all versions of the
# dataverse dataset, including the latest version and previous versions (v3,
# v2, etc). Dataverse doesn't mint DOIs for each version of a dataset, but
# that has been discussed in https://github.com/IQSS/dataverse/issues/4499,
#
"spec,resolved_spec,resolved_ref,resolved_ref_url,build_slug",
[
[
"10.7910/DVN/TJCLKP",
"10.7910/DVN/TJCLKP",
"3035124.v4.0",
r"3035124.v\d+.\d+",
"https://doi.org/10.7910/DVN/TJCLKP",
"dataverse-dvn-2ftjclkp",
],
[
"10.25346/S6/DE95RT",
"10.25346/S6/DE95RT",
"20460.v1.0",
r"20460.v\d+.\d+",
"https://doi.org/10.25346/S6/DE95RT",
"dataverse-s6-2fde95rt",
],
Expand All @@ -191,7 +197,7 @@ async def test_dataverse(

# have to resolve the ref first
ref = await provider.get_resolved_ref()
assert ref == resolved_ref
assert re.match(resolved_ref, ref)

slug = provider.get_build_slug()
assert slug == build_slug
Expand Down

0 comments on commit c286f3c

Please sign in to comment.