-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix STAC-version dependent check for "collection-assets" in collectio…
…n metadata #53
- Loading branch information
Showing
4 changed files
with
47 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,12 @@ | ||
|
||
|
||
# 0.2.2 | ||
|
||
- Fix STAC-version dependent check for "collection-assets" (core) extension in collections assets test | ||
([#53](https://github.com/Open-EO/openeo-test-suite/issues/53)). | ||
|
||
|
||
# 0.2.1 | ||
|
||
- Include openeo-api and openeo-process project versions in report | ||
([#50](https://github.com/Open-EO/openeo-test-suite/issues/50)) | ||
([#50](https://github.com/Open-EO/openeo-test-suite/issues/50)). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
__version__ = "0.2.1" | ||
__version__ = "0.2.2" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
src/openeo_test_suite/lib/internal-tests/test_collection_metadata.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import pytest | ||
|
||
from openeo_test_suite.lib.collection_metadata import OpeneoApiCollectionTests | ||
|
||
|
||
@pytest.mark.parametrize( | ||
["stac_version", "extra_stac_extensions", "expect_success"], | ||
[ | ||
("0.9.0", [], True), | ||
("1.0.0-beta.1", [], False), | ||
("1.0.0-beta.1", ["collection-assets"], True), | ||
("1.0.0-beta.2", [], False), | ||
("1.0.0-beta.2", ["collection-assets"], True), | ||
("1.0.0-rc.1", [], True), | ||
("1.0.0", [], True), | ||
], | ||
) | ||
def test_collection_assets(stac_version, extra_stac_extensions, expect_success): | ||
stac_extensions = [ | ||
"https://stac-extensions.github.io/datacube/v2.2.0/schema.json" | ||
] + extra_stac_extensions | ||
collection = { | ||
"stac_version": stac_version, | ||
"stac_extensions": stac_extensions, | ||
"id": "S2", | ||
"cube:dimensions": {}, | ||
"summaries": {}, | ||
"assets": {}, | ||
} | ||
try: | ||
OpeneoApiCollectionTests(collection) | ||
success = True | ||
except AssertionError: | ||
success = False | ||
|
||
assert success == expect_success |