Skip to content

Commit c24dd7f

Browse files
VIA-346 SB Correct NBS endpoint URL config.
1 parent 18d33cf commit c24dd7f

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

infrastructure/environments/test/fake-api/modules/ecs-service/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ resource "aws_ecs_task_definition" "main" {
103103
},
104104
{
105105
name = "NBS_URL"
106-
value = "${var.app_root_url}/nbs"
106+
value = "${var.alb_dns_name}/nbs"
107107
}
108108
]
109109
logConfiguration = {

infrastructure/environments/test/fake-api/readme.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,11 @@ Tag, promote, and deploy to the test environment, as per the [usual process](htt
1313
#### Test locally
1414

1515
```sh
16-
./create_tokens.sh "../../../../../vita-app-sandpit.pid" "http://localhost:9123" 86400
17-
18-
docker build --no-cache -t fake-api .
16+
docker stop local-fake-api ## Will fail if the contain doesn't exist, which is fine
1917

20-
docker stop local-fake-api
18+
./create_tokens.sh "../../../../../vita-app-sandpit.pid" "http://localhost:9123" 86400
2119

22-
docker run -d --rm -p 9123:9123 -e ELID_DELAY_SECONDS=1 -e APIM_DELAY_SECONDS=1 --name local-fake-api fake-api
20+
docker build --no-cache -t fake-api . && docker run -d --rm -p 9123:9123 -e ELID_DELAY_SECONDS=1 -e APIM_DELAY_SECONDS=1 --name local-fake-api fake-api
2321

2422
docker logs local-fake-api --follow | less +F # If you need to see what's going on in nginx
2523

@@ -34,7 +32,7 @@ curl http://localhost:9123/.well-known/openid-configuration | jq
3432
curl -v http://localhost:9123/authorize?state=sausages
3533
curl -X POST http://localhost:9123/token
3634

37-
curl -v http://localhost:9123/nbs
35+
curl -v http://localhost:9123/nbs?any=old&rubbish=here
3836
```
3937

4038
##### Test against local VitA
@@ -57,7 +55,10 @@ Start up VitA as normal, then hit [/api/sso](https://localhost:3000/api/sso?asse
5755
For the following steps, you need to have deployed the infrastructure at least once, to get the ALB DNS name.
5856

5957
```sh
58+
aws sso login --profile vita-test
59+
6060
fake_api_url="http://"$(aws elbv2 describe-load-balancers --profile vita-test | jq -r '.LoadBalancers[] | select(.LoadBalancerName == "fake-api-project-alb") | .DNSName')
61+
6162
./create_tokens.sh "../../../../../vita-app-sandpit.pid" "$fake_api_url" 315569520
6263

6364
docker build --no-cache --platform linux/amd64 -t fake-api .
@@ -68,8 +69,6 @@ docker build --no-cache --platform linux/amd64 -t fake-api .
6869
Ensure you are [configured to access the test environment in AWS via the command line](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-quickstart.html). These instructions assume you've named your profile `vita-test`. All the info you need for that should be available via the [access portal](https://d-9c67018f89.awsapps.com/start/#/?tab=accounts).
6970

7071
```sh
71-
aws sso login --profile vita-test
72-
7372
fake_api_ecr_repository_url=$(aws ecr describe-repositories --profile vita-test | jq -r '.repositories[] | select(.repositoryName == "fake-api") | .repositoryUri')
7473

7574
aws ecr get-login-password --region eu-west-2 --profile vita-test | docker login --username AWS --password-stdin $(echo $fake_api_ecr_repository_url | cut -d/ -f1)
@@ -90,7 +89,8 @@ fake_api_url="http://"$(aws elbv2 describe-load-balancers --profile vita-test |
9089

9190
curl -v $fake_api_url/health
9291

93-
curl $fake_api_url/eligibility-signposting-api/patient-check/9658218989 | jq
92+
curl $fake_api_url/eligibility-signposting-api/patient-check/9658218989 | jq
93+
curl $fake_api_url/eligibility-signposting-api/patient-check/9658218881 | jq
9494

9595
curl -v -X POST $fake_api_url/oauth2/token
9696

0 commit comments

Comments
 (0)