Skip to content

Commit

Permalink
Renovate Update Patch & Minor Updates (#859)
Browse files Browse the repository at this point in the history
* Renovate Update Patch & Minor Updates

* Upgrade localstack to 3.0.0

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Joshua Hawxwell <[email protected]>
  • Loading branch information
renovate[bot] and hawx authored Nov 24, 2023
1 parent 01e0dc7 commit bb1b31a
Show file tree
Hide file tree
Showing 14 changed files with 391 additions and 328 deletions.
22 changes: 11 additions & 11 deletions cypress/e2e/donor/payment.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,9 @@ describe('Pay for LPA', () => {
const uid = text.split(':')[1].trim();
cy.visit(`http://localhost:9001/?detail-type=reduced-fee-requested&detail=${uid}`);

cy.contains('"requestType": "HalfFee"');
cy.contains(`"evidence": ["${uid}`);
cy.contains('"evidenceDelivery": "upload"');
cy.contains('"requestType":"HalfFee"');
cy.contains(`"evidence":["${uid}`);
cy.contains('"evidenceDelivery":"upload"');
});
});

Expand Down Expand Up @@ -171,9 +171,9 @@ describe('Pay for LPA', () => {
const uid = text.split(':')[1].trim();
cy.visit(`http://localhost:9001/?detail-type=reduced-fee-requested&detail=${uid}`);

cy.contains('"requestType": "NoFee"');
cy.contains(`"evidence": ["${uid}`);
cy.contains('"evidenceDelivery": "upload"');
cy.contains('"requestType":"NoFee"');
cy.contains(`"evidence":["${uid}`);
cy.contains('"evidenceDelivery":"upload"');
});
});

Expand Down Expand Up @@ -246,9 +246,9 @@ describe('Pay for LPA', () => {
const uid = text.split(':')[1].trim();
cy.visit(`http://localhost:9001/?detail-type=reduced-fee-requested&detail=${uid}`);

cy.contains('"requestType": "NoFee"');
cy.contains(`"evidence": ["${uid}`);
cy.contains('"evidenceDelivery": "upload"');
cy.contains('"requestType":"NoFee"');
cy.contains(`"evidence":["${uid}`);
cy.contains('"evidenceDelivery":"upload"');
});
});

Expand Down Expand Up @@ -316,9 +316,9 @@ describe('Pay for LPA', () => {
const uid = text.split(':')[1].trim();
cy.visit(`http://localhost:9001/?detail-type=reduced-fee-requested&detail=${uid}`);

cy.contains('"requestType": "HardshipFee"');
cy.contains('"requestType":"HardshipFee"');
cy.contains('"evidence"').should('not.exist');
cy.contains('"evidenceDelivery": "post"');
cy.contains('"evidenceDelivery":"post"');
});
});
});
8 changes: 4 additions & 4 deletions cypress/e2e/donor/provide-your-details.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ describe('Provide your details', () => {
const id = url.split('/')[4];

cy.visit(`http://localhost:9001/?detail-type=uid-requested&detail=${id}`);
cy.contains('"Type": "pfa"');
cy.contains(`"name": "John${rnd} Doe${rnd}"`);
cy.contains('"dob": "1990-02-01"');
cy.contains('"postcode": "B14 7ED"');
cy.contains('"Type":"pfa"');
cy.contains(`"name":"John${rnd} Doe${rnd}"`);
cy.contains('"dob":"1990-02-01"');
cy.contains('"postcode":"B14 7ED"');
});
});
});
10 changes: 6 additions & 4 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,14 @@ services:
dockerfile: Dockerfile
container_name: localstack
ports:
- "4566:4566"
- "127.0.0.1:4566:4566" # LocalStack Gateway
- "127.0.0.1:4510-4559:4510-4559" # external services port range
volumes:
- "/var/run/docker.sock:/var/run/docker.sock"
environment:
- SERVICES=s3,secretsmanager,sqs
- DOCKER_HOST=unix:///var/run/docker.sock
- SERVICES=s3,secretsmanager,sqs,dynamodb,events,kms
- DATA_DIR=/tmp/localstack/data
- DEFAULT_REGION=eu-west-1
- USE_SINGLE_REGION=1
- DEBUG=1

mock-onelogin:
Expand Down
2 changes: 1 addition & 1 deletion docker/event-logger/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.21.3-alpine as base
FROM golang:1.21.4-alpine as base

ARG ARCH=amd64

Expand Down
2 changes: 1 addition & 1 deletion docker/localstack/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM localstack/localstack:1.4.0 as localstack
FROM localstack/localstack:3.0.0 as localstack

COPY localstack-init.sh /etc/localstack/init/ready.d/localstack-init.sh
COPY dynamodb-lpa-gsi-schema.json ./dynamodb-lpa-gsi-schema.json
Expand Down
21 changes: 11 additions & 10 deletions docker/localstack/localstack-init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,16 @@ openssl genpkey -algorithm RSA -out /tmp/private_key.pem -pkeyopt rsa_keygen_bit
openssl rsa -pubout -in /tmp/private_key.pem -out /tmp/public_key.pem

echo 'setting secrets'
awslocal secretsmanager create-secret --name "private-jwt-key-base64" --secret-string "$(base64 /tmp/private_key.pem)"
awslocal secretsmanager create-secret --name "gov-uk-onelogin-identity-public-key" --secret-string "LS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS0KTUZrd0V3WUhLb1pJemowQ0FRWUlLb1pJemowREFRY0RRZ0FFSlEyVmtpZWtzNW9rSTIxY1Jma0FhOXVxN0t4TQo2bTJqWllCeHBybFVXQlpDRWZ4cTI3cFV0Qzd5aXplVlRiZUVqUnlJaStYalhPQjFBbDhPbHFtaXJnPT0KLS0tLS1FTkQgUFVCTElDIEtFWS0tLS0tCg=="
awslocal secretsmanager create-secret --name "cookie-session-keys" --secret-string "[\"$(head -c32 /dev/random | base64)\"]"
awslocal secretsmanager create-secret --name "gov-uk-pay-api-key" --secret-string "totally-fake-key"
awslocal secretsmanager create-secret --name "os-postcode-lookup-api-key" --secret-string "another-fake-key"
awslocal secretsmanager create-secret --name "gov-uk-notify-api-key" --secret-string "extremely_fake-a-b-c-d-e-f-g-h-i-j"
awslocal secretsmanager create-secret --region eu-west-1 --name "private-jwt-key-base64" --secret-string "$(base64 /tmp/private_key.pem)"
awslocal secretsmanager create-secret --region eu-west-1 --name "gov-uk-onelogin-identity-public-key" --secret-string "LS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS0KTUZrd0V3WUhLb1pJemowQ0FRWUlLb1pJemowREFRY0RRZ0FFSlEyVmtpZWtzNW9rSTIxY1Jma0FhOXVxN0t4TQo2bTJqWllCeHBybFVXQlpDRWZ4cTI3cFV0Qzd5aXplVlRiZUVqUnlJaStYalhPQjFBbDhPbHFtaXJnPT0KLS0tLS1FTkQgUFVCTElDIEtFWS0tLS0tCg=="
awslocal secretsmanager create-secret --region eu-west-1 --name "cookie-session-keys" --secret-string "[\"$(head -c32 /dev/random | base64)\"]"
awslocal secretsmanager create-secret --region eu-west-1 --name "gov-uk-pay-api-key" --secret-string "totally-fake-key"
awslocal secretsmanager create-secret --region eu-west-1 --name "os-postcode-lookup-api-key" --secret-string "another-fake-key"
awslocal secretsmanager create-secret --region eu-west-1 --name "gov-uk-notify-api-key" --secret-string "extremely_fake-a-b-c-d-e-f-g-h-i-j"

echo 'creating tables'
awslocal dynamodb create-table \
--region eu-west-1 \
--table-name lpas \
--attribute-definitions AttributeName=PK,AttributeType=S AttributeName=SK,AttributeType=S AttributeName=LpaUID,AttributeType=S AttributeName=UpdatedAt,AttributeType=S \
--key-schema AttributeName=PK,KeyType=HASH AttributeName=SK,KeyType=RANGE \
Expand All @@ -24,7 +25,7 @@ echo 'creating bucket'
awslocal s3api create-bucket --bucket evidence --create-bucket-configuration LocationConstraint=eu-west-1

echo 'configuring events'
awslocal sqs create-queue --queue-name event-queue
awslocal events create-event-bus --name default
awslocal events put-rule --name send-events-to-queue-rule --event-bus-name default --event-pattern '{}'
awslocal events put-targets --event-bus-name default --rule send-events-to-queue-rule --targets "Id"="event-queue","Arn"="arn:aws:sqs:eu-west-1:000000000000:event-queue"
awslocal sqs create-queue --region eu-west-1 --queue-name event-queue
awslocal events create-event-bus --region eu-west-1 --name default
awslocal events put-rule --region eu-west-1 --name send-events-to-queue-rule --event-bus-name default --event-pattern '{}'
awslocal events put-targets --region eu-west-1 --event-bus-name default --rule send-events-to-queue-rule --targets "Id"="event-queue","Arn"="arn:aws:sqs:eu-west-1:000000000000:event-queue"
72 changes: 36 additions & 36 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ go 1.21
require (
github.com/MicahParks/keyfunc v1.9.0
github.com/aws/aws-lambda-go v1.41.0
github.com/aws/aws-sdk-go-v2 v1.22.2
github.com/aws/aws-sdk-go-v2/config v1.23.0
github.com/aws/aws-sdk-go-v2/feature/dynamodb/attributevalue v1.12.1
github.com/aws/aws-sdk-go-v2/service/dynamodb v1.25.1
github.com/aws/aws-sdk-go-v2/service/eventbridge v1.24.1
github.com/aws/aws-sdk-go-v2/service/s3 v1.42.1
github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.23.1
github.com/aws/aws-sdk-go-v2/service/sqs v1.24.5
github.com/aws/smithy-go v1.16.0
github.com/aws/aws-sdk-go-v2 v1.23.1
github.com/aws/aws-sdk-go-v2/config v1.25.4
github.com/aws/aws-sdk-go-v2/feature/dynamodb/attributevalue v1.12.3
github.com/aws/aws-sdk-go-v2/service/dynamodb v1.25.3
github.com/aws/aws-sdk-go-v2/service/eventbridge v1.25.1
github.com/aws/aws-sdk-go-v2/service/s3 v1.43.1
github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.23.3
github.com/aws/aws-sdk-go-v2/service/sqs v1.28.2
github.com/aws/smithy-go v1.17.0
github.com/dustin/go-humanize v1.0.1
github.com/felixge/httpsnoop v1.0.4
github.com/gabriel-vasile/mimetype v1.4.3
Expand All @@ -28,14 +28,14 @@ require (
github.com/stretchr/testify v1.8.4
github.com/vektra/mockery v1.1.2
github.com/xeipuuv/gojsonschema v1.2.0
go.opentelemetry.io/contrib/detectors/aws/ecs v1.20.0
go.opentelemetry.io/contrib/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws v0.45.0
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.45.0
go.opentelemetry.io/contrib/propagators/aws v1.20.0
go.opentelemetry.io/otel v1.19.0
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.19.0
go.opentelemetry.io/otel/sdk v1.19.0
go.opentelemetry.io/otel/trace v1.19.0
go.opentelemetry.io/contrib/detectors/aws/ecs v1.21.1
go.opentelemetry.io/contrib/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws v0.46.1
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.1
go.opentelemetry.io/contrib/propagators/aws v1.21.1
go.opentelemetry.io/otel v1.21.0
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.21.0
go.opentelemetry.io/otel/sdk v1.21.0
go.opentelemetry.io/otel/trace v1.21.0
golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa
golang.org/x/mod v0.14.0
golang.org/x/text v0.14.0
Expand All @@ -44,26 +44,26 @@ require (
)

require (
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.5.0 // indirect
github.com/aws/aws-sdk-go-v2/credentials v1.15.2 // indirect
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.3 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.2 // indirect
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.2 // indirect
github.com/aws/aws-sdk-go-v2/internal/ini v1.6.0 // indirect
github.com/aws/aws-sdk-go-v2/internal/v4a v1.2.2 // indirect
github.com/aws/aws-sdk-go-v2/service/dynamodbstreams v1.17.1 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.10.0 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.2.2 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery v1.8.2 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.2 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.16.2 // indirect
github.com/aws/aws-sdk-go-v2/service/sso v1.17.1 // indirect
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.19.1 // indirect
github.com/aws/aws-sdk-go-v2/service/sts v1.25.1 // indirect
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.5.1 // indirect
github.com/aws/aws-sdk-go-v2/credentials v1.16.3 // indirect
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.5 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.4 // indirect
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.4 // indirect
github.com/aws/aws-sdk-go-v2/internal/ini v1.7.1 // indirect
github.com/aws/aws-sdk-go-v2/internal/v4a v1.2.4 // indirect
github.com/aws/aws-sdk-go-v2/service/dynamodbstreams v1.17.3 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.10.1 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.2.4 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery v1.8.4 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.4 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.16.4 // indirect
github.com/aws/aws-sdk-go-v2/service/sso v1.17.3 // indirect
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.20.1 // indirect
github.com/aws/aws-sdk-go-v2/service/sts v1.25.4 // indirect
github.com/brunoscheufler/aws-ecs-metadata-go v0.0.0-20220812150832-b6b31c6eeeaf // indirect
github.com/cenkalti/backoff/v4 v4.2.1 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/go-logr/logr v1.2.4 // indirect
github.com/go-logr/logr v1.3.0 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/gorilla/securecookie v1.1.2 // indirect
Expand All @@ -75,8 +75,8 @@ require (
github.com/stretchr/objx v0.5.0 // indirect
github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f // indirect
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.19.0 // indirect
go.opentelemetry.io/otel/metric v1.19.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.21.0 // indirect
go.opentelemetry.io/otel/metric v1.21.0 // indirect
go.opentelemetry.io/proto/otlp v1.0.0 // indirect
golang.org/x/net v0.18.0 // indirect
golang.org/x/sys v0.14.0 // indirect
Expand Down
Loading

0 comments on commit bb1b31a

Please sign in to comment.