From 69ad99c2b6728c1b9f2344000eef2c568e825274 Mon Sep 17 00:00:00 2001 From: Cory Francis Myers Date: Wed, 31 Jan 2024 16:52:43 -0800 Subject: [PATCH] build(regenerate-sdk-cassettes): help the developer through regenerating SDK cassettes against a development server --- client/Makefile | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/client/Makefile b/client/Makefile index 3c7e976363..c0d4dc01d3 100644 --- a/client/Makefile +++ b/client/Makefile @@ -109,6 +109,14 @@ test-functional: ## Run the functional tests test-sdk: ## Run just the sdk tests @poetry run pytest -v $(STESTS) +.PHONY: regenerate-sdk-cassettes +regenerate-sdk-cassettes: + @echo "Checking if a development server is available to regenerate cassettes..." + @echo "NB. It should be a fresh development server via \"make dev\", with no other data! HTTP requests and responses will be recorded unredacted, including credentials and tokens." + @curl http://localhost:8080/metadata + @rm -fr tests/sdk/data/ + @make test-sdk + .PHONY: lint lint: ## Run the linters @poetry run flake8 securedrop_client tests