Skip to content

Commit

Permalink
fixup! Adapt to enable_basic_auth config
Browse files Browse the repository at this point in the history
  • Loading branch information
soxofaan committed Nov 8, 2023
1 parent c7a323a commit 7cf6adc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/openeo_aggregator/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ def get_config(x: Union[str, Path, AggregatorConfig, None] = None) -> Aggregator
class AggregatorBackendConfig(OpenEoBackendConfig):
# TODO #112 migrate everything from AggregatorConfig to this class

capabilities_backend_version = openeo_aggregator.about.__version__
capabilities_deploy_metadata = build_backend_deploy_metadata(
capabilities_backend_version: str = openeo_aggregator.about.__version__
capabilities_deploy_metadata: dict = build_backend_deploy_metadata(
packages=["openeo", "openeo_driver", "openeo_aggregator"],
)
7 changes: 7 additions & 0 deletions tests/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
RegexMatcher,
)

import openeo_aggregator.about
from openeo_aggregator.config import AggregatorConfig, get_config_dir
from openeo_aggregator.constants import JOB_OPTION_FORCE_BACKEND
from openeo_aggregator.metadata import (
Expand All @@ -42,6 +43,7 @@ def test_capabilities(self, api100):
res = api100.get("/").assert_status_code(200)
capabilities = res.json
assert capabilities["api_version"] == "1.0.0"
assert capabilities["backend_version"] == openeo_aggregator.about.__version__
endpoints = capabilities["endpoints"]
assert {"methods": ["GET"], "path": "/collections"} in endpoints
assert {"methods": ["GET"], "path": "/collections/{collection_id}"} in endpoints
Expand Down Expand Up @@ -73,6 +75,11 @@ def test_billing_plans(self, api100):
assert "early-adopter" in plans
assert plans["early-adopter"]["paid"] is True

def test_deploy_metadata(self, api100):
capabilities = api100.get("/").assert_status_code(200).json
assert "openeo_aggregator" in capabilities["processing:software"]


def test_only_oidc_auth(self, api100):
res = api100.get("/").assert_status_code(200)
capabilities = res.json
Expand Down

0 comments on commit 7cf6adc

Please sign in to comment.