Skip to content

Commit

Permalink
Test /server-info endpoint in Dockerized environment
Browse files Browse the repository at this point in the history
  • Loading branch information
jwodder committed Jun 8, 2023
1 parent bd250d6 commit f75e916
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions dandi/tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@
from pathlib import Path
import time
from typing import Iterable, List
from urllib.parse import urlparse, urlunparse

import pytest
import requests
import responses
from semantic_version import Version

from .skip import mark
from .fixtures import DandiAPI
from .. import __version__
from ..consts import DandiInstance, known_instances
from ..exceptions import BadCliVersionError, CliVersionTooOldError
Expand Down Expand Up @@ -394,10 +395,10 @@ def test_get_instance_arbitrary_api_url() -> None:
)


@pytest.mark.xfail(reason="https://github.com/dandi/dandi-archive/issues/1045")
@mark.skipif_no_network
def test_server_info() -> None:
r = requests.get("https://dandiarchive.org/server-info")
def test_server_info(local_dandi_api: DandiAPI) -> None:
u = urlparse(local_dandi_api.api_url)
root_url = urlunparse(u[:2] + ("",) * 4)
r = requests.get(f"{root_url}/server-info")
r.raise_for_status()
data = r.json()
assert "version" in data
Expand Down

0 comments on commit f75e916

Please sign in to comment.