diff --git a/dandi/dandiapi.py b/dandi/dandiapi.py index 553ec672c..1b64eedb8 100644 --- a/dandi/dandiapi.py +++ b/dandi/dandiapi.py @@ -1106,6 +1106,10 @@ def wait_until_valid(self, max_time: float = 120) -> None: v = self.get_version(self.version_id) if v.status is VersionStatus.VALID and not v.asset_validation_errors: return + # TODO(asmacdo) can we fail fast? + if v.status is VersionStatus.INVALID: + break + sleep(0.5) # TODO: Improve the presentation of the error messages about = { diff --git a/dandi/tests/fixtures.py b/dandi/tests/fixtures.py index d246109ab..08b62ebcd 100644 --- a/dandi/tests/fixtures.py +++ b/dandi/tests/fixtures.py @@ -434,12 +434,16 @@ def docker_compose_setup() -> Iterator[dict[str, str]]: "--rm", "-e", "DJANGO_SUPERUSER_PASSWORD=nsNc48DBiS", + "-e", + "DJANGO_SUPERUSER_EMAIL=admin@nil.nil", + "-e", + "DJANGO_SUPERUSER_FIRST_NAME=Test", + "-e", + "DJANGO_SUPERUSER_LAST_NAME=Admin", "django", "./manage.py", "createsuperuser", "--no-input", - "--email", - "admin@nil.nil", ], cwd=str(LOCAL_DOCKER_DIR), env=env, @@ -578,10 +582,6 @@ def mkdandiset(self, name: str, embargo: bool = False) -> SampleDandiset: { "description": "A test Dandiset", "license": ["spdx:CC0-1.0"], - # The contributor needs to be given explicitly here or else - # it'll be set based on the user account. For the Docker - # Compose setup, that would mean basing it on the admin user, - # whose name doesn't validate under dandischema. "contributor": [ { "schemaKey": "Person",