Temperatura por CEP
-
Execute o comando:
make prepare
-
Ele gera dois arquivos:
env.dev.json
emenv.prod.json
, em um real cenário, poderia usar diferentes valores -
No caso vamos testar prod
make run-prod
Execute: curl -s http://localhost:8080/temperature?cep=05025-000
- Configurar as seguintes variaveis:
ENV_PROJECT_ID
: seu projectIDENV_ARG
: pode serprod
oudev
.
- Locar usando
gcloud auth login
- executar
gcloud config set project ${ENV_PROJECT_ID}
- depois
deploy.sh
como o exemplo abaixo:ENV_PROJECT_ID=generic-3232322 ENV_ARG=prod ./deploy.sh
- For this project, we have this URL to test using
GET
methodcurl https://temperature-uz6atyp8yq-uc.a.run.app/temperature?cep=05025-000 | jq
API_URL=http://localhost:8080 go test -v ./tests/integration