Skip to content

Commit a746a34

Browse files
Merge branch 'main' into main
2 parents 6e02451 + a917fad commit a746a34

7 files changed

Lines changed: 97 additions & 58 deletions

File tree

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ repos:
1010
- id: check-yaml
1111
- id: check-added-large-files
1212
- repo: https://github.com/astral-sh/ruff-pre-commit
13-
rev: v0.15.11
13+
rev: v0.15.12
1414
hooks:
1515
- id: ruff
1616
args: ["--fix", "--show-fixes"]

CHANGELOG.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,19 @@ versioning. Rather than a static releases, this repository contains of a number
55
of regression tests that are each semi-independent. This CHANGELOG file should be used
66
to document pull requests to this repository.
77

8-
## 2026-04-28 ([#275](https://github.com/nasa/harmony-regression-tests/pull/275))
8+
## 2026-05-07 ([#275](https://github.com/nasa/harmony-regression-tests/pull/275))
99

1010
### Added
1111

1212
- Added basic GCOV test cases to `net2cog` test.
1313

14+
## 2026-04-29 ([#281](https://github.com/nasa/harmony-regression-tests/pull/281))
15+
16+
### Changed
17+
18+
- The `harmony` regression test has been changed to verify harmony's successful
19+
deployment by verifying expected returns from a selection of endpoints.
20+
1421
## 2026-04-24 ([#277](https://github.com/nasa/harmony-regression-tests/pull/277))
1522

1623
### Changed

test/harmony/Harmony.ipynb

Lines changed: 81 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,27 @@
22
"cells": [
33
{
44
"cell_type": "markdown",
5-
"metadata": {},
5+
"metadata": {
6+
"editable": true,
7+
"slideshow": {
8+
"slide_type": ""
9+
},
10+
"tags": []
11+
},
612
"source": [
713
"# Harmony Regression Test Suite\n",
814
"\n",
9-
"This test suite ensures some overall features of the main Harmony service work as expected. Currently that is limited to ensuring the expected services are deployed to all Harmony environments."
15+
"This test suite ensures some Harmony Service was deployed successfully and the expected endpoints are returning successfully."
1016
]
1117
},
1218
{
1319
"cell_type": "code",
1420
"execution_count": null,
1521
"metadata": {
22+
"editable": true,
23+
"slideshow": {
24+
"slide_type": ""
25+
},
1626
"tags": [
1727
"parameters"
1828
]
@@ -24,7 +34,13 @@
2434
},
2535
{
2636
"cell_type": "markdown",
27-
"metadata": {},
37+
"metadata": {
38+
"editable": true,
39+
"slideshow": {
40+
"slide_type": ""
41+
},
42+
"tags": []
43+
},
2844
"source": [
2945
"## Prerequisites\n",
3046
"\n",
@@ -37,49 +53,79 @@
3753
},
3854
{
3955
"cell_type": "markdown",
40-
"metadata": {},
41-
"source": [
42-
"## Import required packages:"
43-
]
44-
},
45-
{
46-
"cell_type": "code",
47-
"execution_count": null,
48-
"metadata": {},
49-
"outputs": [],
50-
"source": [
51-
"import requests"
52-
]
53-
},
54-
{
55-
"cell_type": "markdown",
56-
"metadata": {},
56+
"metadata": {
57+
"editable": true,
58+
"slideshow": {
59+
"slide_type": ""
60+
},
61+
"tags": []
62+
},
5763
"source": [
58-
"## Ensure expected services are available, per the `/versions` endpoint:"
64+
"## Ensure endpoints are returning expected values."
5965
]
6066
},
6167
{
6268
"cell_type": "code",
6369
"execution_count": null,
64-
"metadata": {},
70+
"metadata": {
71+
"editable": true,
72+
"slideshow": {
73+
"slide_type": ""
74+
},
75+
"tags": []
76+
},
6577
"outputs": [],
6678
"source": [
67-
"expected_service_names = [\n",
68-
" 'harmony/service-example',\n",
69-
" 'nasa/harmony-gdal-adapter',\n",
70-
" 'podaac/l2-subsetter',\n",
79+
"import requests\n",
80+
"from requests.adapters import HTTPAdapter\n",
81+
"from urllib3.util.retry import Retry\n",
82+
"\n",
83+
"# Set up retrying so we don't fail for a transient error.\n",
84+
"retry_strategy = Retry(\n",
85+
" total=5,\n",
86+
" backoff_factor=2,\n",
87+
" status_forcelist=[500, 502, 503, 504],\n",
88+
")\n",
89+
"\n",
90+
"adapter = HTTPAdapter(max_retries=retry_strategy)\n",
91+
"session = requests.Session()\n",
92+
"session.mount('https://', adapter)\n",
93+
"session.mount('http://', adapter)\n",
94+
"\n",
95+
"harmony_endpoints = [\n",
96+
" '',\n",
97+
" 'cloud-access',\n",
98+
" 'docs',\n",
99+
" 'docs/api',\n",
100+
" 'docs/edr-api',\n",
101+
" 'health',\n",
102+
" 'jobs',\n",
103+
" 'readiness',\n",
104+
" 'service-deployment',\n",
105+
" 'service-deployments-state',\n",
106+
" 'service-image-tag',\n",
107+
" 'versions',\n",
108+
" 'workflow-ui',\n",
71109
"]\n",
72110
"\n",
73-
"versions_response = requests.get(f'{harmony_host_url}/versions')\n",
74-
"versions_response.raise_for_status()\n",
75-
"actual_services = versions_response.json()\n",
111+
"for endpoint in harmony_endpoints:\n",
112+
" try:\n",
113+
" response = session.get(f'{harmony_host_url}/{endpoint}')\n",
114+
" response.raise_for_status()\n",
115+
" assert response.status_code == 200\n",
116+
" print(f'Endpoint /{endpoint} alive.')\n",
117+
" except Exception:\n",
118+
" raise Exception(\n",
119+
" f'TEST FAILED: Bad response from endpoint {harmony_host_url}/{endpoint}'\n",
120+
" ) from None\n",
121+
"\n",
122+
"# /capabilities requires a collection so a 400 error is expected.\n",
123+
"response = session.get(f'{harmony_host_url}/capabilities')\n",
124+
"assert response.status_code == 400\n",
125+
"print('Endpoint /capabilities alive.')\n",
76126
"\n",
77-
"for expected_service_name in expected_service_names:\n",
78-
" assert any(\n",
79-
" [service.get('name') == expected_service_name for service in actual_services]\n",
80-
" ), f'Could not find service: {expected_service_name}'\n",
81127
"\n",
82-
"print('All expected services returned from /versions endpoint.')"
128+
"print('All expected endpoints responding.')"
83129
]
84130
}
85131
],
@@ -100,7 +146,7 @@
100146
"name": "python",
101147
"nbconvert_exporter": "python",
102148
"pygments_lexer": "ipython3",
103-
"version": "3.10.13"
149+
"version": "3.13.13"
104150
}
105151
},
106152
"nbformat": 4,

test/harmony/__init__.py

Whitespace-only changes.

test/harmony/environment.yaml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@ channels:
33
- conda-forge
44
- nodefaults
55
dependencies:
6-
- python=3.10
7-
- notebook==6.5.4
8-
- requests==2.29.0
9-
- papermill==2.3.4
6+
- python=3.13
7+
- notebook==7.5.5
8+
- requests==2.32.5
9+
- papermill==2.7.0
10+
- pip
1011
- pip:
11-
- harmony-py
12+
- harmony-py==1.3.3

test/harmony/util.py

Lines changed: 0 additions & 15 deletions
This file was deleted.

test/harmony/version.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.1.7
1+
0.2.0

0 commit comments

Comments
 (0)