Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/wiremock.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:

docker pull localstack/localstack-pro &
docker pull wiremock/wiremock &
docker pull public.ecr.aws/lambda/python:3.9 &
docker pull public.ecr.aws/lambda/python:3.12 &
pip install localstack terraform-local awscli-local[ver1]

make install
Expand Down
11 changes: 5 additions & 6 deletions wiremock/bin/create-stubs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,14 @@

# Import stubs into OSS WireMock (for WireMock Runner, use setup-wiremock-runner.sh)

STUBS_URL="${STUBS_URL:-https://library.wiremock.org/catalog/api/p/personio.de/personio-de-personnel/personio.de-personnel-stubs.json}"
TMP_STUBS_FILE="/tmp/personio-stubs.json"
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
STUBS_FILE="${SCRIPT_DIR}/../sample-app-oss/stubs.json"
WIREMOCK_URL="${WIREMOCK_URL:-http://wiremock.localhost.localstack.cloud:4566}"

echo "Downloading stubs from ${STUBS_URL}..."
curl -s -o "$TMP_STUBS_FILE" "$STUBS_URL"

# Note: stubs are bundled locally because library.wiremock.org now redirects to HTML
# rather than serving the JSON file directly, making the remote URL unreliable.
echo "Importing stubs into WireMock at ${WIREMOCK_URL}..."
curl -v -X POST -H "Content-Type: application/json" --data-binary "@$TMP_STUBS_FILE" "${WIREMOCK_URL}/__admin/mappings/import"
curl -v -X POST -H "Content-Type: application/json" --data-binary "@$STUBS_FILE" "${WIREMOCK_URL}/__admin/mappings/import"

echo ""
echo "Verify stubs at: ${WIREMOCK_URL}/__admin/mappings"
2 changes: 1 addition & 1 deletion wiremock/sample-app-oss/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ resource "aws_lambda_function" "hr_info_lambda" {
source_code_hash = data.archive_file.lambda_zip.output_base64sha256

handler = "handler.get_time_off"
runtime = "python3.9"
runtime = "python3.12"

# Add a timeout for the function
timeout = 10
Expand Down
Loading
Loading