Skip to content

Commit

Permalink
Merge pull request #857 from NHSDigital/release
Browse files Browse the repository at this point in the history
CCM-8331: Release v4.34.0 merge to master
  • Loading branch information
ClareJonesBJSS authored Jan 17, 2025
2 parents 6e6aa01 + 7c1f123 commit 0f57049
Show file tree
Hide file tree
Showing 13 changed files with 1,042 additions and 846 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
fetch-depth: 0 # This causes all history to be fetched, which is required for calculate-version to function

- name: Install Python 3.8
uses: actions/setup-python@v1
uses: actions/setup-python@v4
with:
python-version: 3.8

Expand Down
28 changes: 14 additions & 14 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1,171 changes: 684 additions & 487 deletions poetry.lock

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,28 +17,28 @@ keywords = ["healthcare", "uk", "nhs", "communications", "email", "sms", "letter

[tool.poetry.dependencies]
python = "^3.8"
pytest-nhsd-apim = "^3.4.0"
pytest-nhsd-apim = "^4.0.0"
pytest-xdist = "^3.5.0"
pre-commit = "^3.5.0"
pytest-rerunfailures = "^12.0"
pytest-rerunfailures = "^14.0"
sphinx = "7.1.2"
sphinx-markdown-builder = "^0.6.6"
sphinx-markdown-builder = "^0.6.7"
notifications-python-client = "^9.0.0"
polling = "^0.3.2"
playwright = "^1.45.0"
playwright = "^1.48.0"
install_playwright = "^0.1.0"

[tool.poetry.dev-dependencies]
flake8 = "^5.0.4"
black = "^24.4"
pip-licenses = "^4.3.4"
jinja2 = "^3.1.4"
jinja2 = "^3.1.5"
pyyaml = "^6.0"
docopt = "^0.6.2"
jsonpath-rw = "^1.4.0"
semver = "^3.0.2"
gitpython = "^3.1.43"
pytest = "^8.2.0"
pytest = "^8.3.4"
coverage = "^7.4.4"
pytest-asyncio = "^0.20.3"

Expand Down
74 changes: 37 additions & 37 deletions sandbox/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions sandbox/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
"license": "Unlicense",
"private": true,
"dependencies": {
"express": "^5.0.0",
"express": "^5.0.1",
"ksuid": "^3.0.0",
"loglevel": "^1.9.1",
"uuid": "^10.0.0"
"loglevel": "^1.9.2",
"uuid": "^11.0.3"
},
"devDependencies": {
"c8": "^10.1.2",
Expand All @@ -25,7 +25,7 @@
"mocha": "^10.7.3",
"mocha-junit-reporter": "^2.2.1",
"mocha-multi": "^1.1.3",
"nodemon": "^3.1.4",
"nodemon": "^3.1.7",
"supertest": "^7.0.0"
}
}
2 changes: 1 addition & 1 deletion scripts/run_zap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ docker container run \
-v $TEMP_DIR:/zap/tmp/:rw \
-v $(pwd)/zap/comms-manager-json/:/home/zap/.ZAP/reports/comms-manager-json/:rw \
-t zap \
bash -c "./zap.sh -addoninstallall -cmd -autorun /zap/wrk/zap/zap.yaml"
bash -c "./zap.sh -cmd -autorun /zap/wrk/zap/zap.yaml"

# generate our nunit report from the zap JSON report
./node_modules/.bin/hbs --data $TEMP_DIR/zap-report.json zap/nunit-template.hbs -s > zap-report.xml
Expand Down
9 changes: 4 additions & 5 deletions tests/development/authentication/test_403_errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,10 @@

@pytest.mark.devtest
@pytest.mark.nhsd_apim_authorization(
{
"access": "healthcare_worker",
"level": "aal3",
"login_form": {"username": "656005750104"},
}
access="healthcare_worker",
level="aal3",
login_form={"username": "656005750104"},
authentication="separate",
)
@pytest.mark.parametrize("correlation_id", CORRELATION_IDS)
@pytest.mark.parametrize("method", METHODS)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,10 @@
from lib.fixtures import * # NOSONAR
from lib.constants.messages_paths import MESSAGES_ENDPOINT
import lib.constants.constants as constants
from lib.constants.constants import CORRELATION_IDS


@pytest.mark.devtest
@pytest.mark.parametrize("correlation_id", CORRELATION_IDS)
def test_not_permitted_to_use_contact_details(nhsd_apim_proxy_url, bearer_token_internal_dev_test_1, correlation_id):
def test_not_permitted_to_use_contact_details(nhsd_apim_proxy_url, bearer_token_internal_dev_test_1):
"""
.. include:: ../../partials/validation/test_not_permitted_to_use_contact_details.rst
"""
Expand All @@ -31,7 +29,7 @@ def test_not_permitted_to_use_contact_details(nhsd_apim_proxy_url, bearer_token_
"Authorization": bearer_token_internal_dev_test_1.value,
"Accept": constants.DEFAULT_CONTENT_TYPE,
"Content-Type": constants.DEFAULT_CONTENT_TYPE,
"X-Correlation-Id": correlation_id,
"X-Correlation-Id": None,
}, json=data
)

Expand All @@ -44,5 +42,5 @@ def test_not_permitted_to_use_contact_details(nhsd_apim_proxy_url, bearer_token_
"pointer": "/data/attributes/recipient/contactDetails"
}
),
correlation_id
None
)
9 changes: 3 additions & 6 deletions tests/development/rate_limiting/test_429_errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
from lib.constants.messages_paths import MESSAGES_ENDPOINT
import time

CORRELATION_IDS = [None, "0f160ae2-9b62-47bf-bdf0-c6a844d59488"]

test_client_1_details = {
"email": "[email protected]",
"name": "NHS Notify Test Client 1"
Expand All @@ -26,8 +24,7 @@ def send_multiple_requests(url, headers, count=10, delay=0):


@pytest.mark.devperftest
@pytest.mark.parametrize("correlation_id", CORRELATION_IDS)
def test_429_triggered_app_quota(nhsd_apim_proxy_url, bearer_token_internal_dev, rate_limiting, correlation_id):
def test_429_triggered_app_quota(nhsd_apim_proxy_url, bearer_token_internal_dev, rate_limiting):

"""
.. include:: ../../partials/too_many_requests/test_429_global_app_quota.rst
Expand All @@ -38,7 +35,7 @@ def test_429_triggered_app_quota(nhsd_apim_proxy_url, bearer_token_internal_dev,
"Authorization": bearer_token_internal_dev.value,
"Accept": "*/*",
"Content-Type": "application/json",
"X-Correlation-Id": correlation_id
"X-Correlation-Id": None
}

resp = send_multiple_requests(default_request_url(nhsd_apim_proxy_url), headers)
Expand All @@ -49,7 +46,7 @@ def test_429_triggered_app_quota(nhsd_apim_proxy_url, bearer_token_internal_dev,
Generators.generate_quota_error_custom(
"Your application, Comms-manager-local, "
"has exceeded its quota of 4 requests every 1 minute(s) and is being rate limited."),
correlation_id
None
)

assert "Retry-After" in resp.headers
Expand Down
Loading

0 comments on commit 0f57049

Please sign in to comment.