AppFlowy-Cloud/tests
Zack 853f089ca0
feat: test gotrue when app start, use state for gotrue client, use go… (#24)
* feat: test gotrue when app start, use state for gotrue client, use gotrue UUID instead of BIGINT for user uid

* feat: backward compatibility with native authetication

* fix: native auth use uuid instead

* fix: sqlx preparation

* fix: sqlx metadata and unused variable

* fix: clippy

* fix: create workspace if not exist after sign in

* chore: update .sqlx with new query

* feat: query workspace

* revert: revert using i64 for user id

* fix: update sqlx queries

* fix: update .sqlx metadata

* feat: only use uuid from sqlx types, select user_profile view

* ci: add version check

* ci: add missing sqlx files

* chore: cargo fmt
2023-09-11 17:16:41 +08:00
..
api feat: refactor server collab (#15) 2023-09-06 18:22:40 +08:00
client feat: test gotrue when app start, use state for gotrue client, use go… (#24) 2023-09-11 17:16:41 +08:00
gotrue feat: test gotrue when app start, use state for gotrue client, use go… (#24) 2023-09-11 17:16:41 +08:00
README.md docs: test + deploy + environmental variables (#14) 2023-09-07 15:29:39 +08:00
main.rs chore: move realtime test (#26) 2023-09-10 19:35:29 +08:00

README.md

Cloud Test

Prerequisites

  • docker-compose
  • SMTP server
  • enviromental variables
# put in .env in the same directory
GOTRUE_JWT_SECRET=some_secret_key # self defined
GOTRUE_SMTP_HOST=smtp.gmail.com   # using gmail smtp as example, change if needed
GOTRUE_SMTP_PORT=465
GOTRUE_SMTP_USER=email_sender@some_company.com
GOTRUE_SMTP_PASS=email_sender_password
GOTRUE_SMTP_ADMIN_EMAIL=comp_admin@@some_company.com
# GOTRUE_MAILER_AUTOCONFIRM false

GOTRUE_REGISTERED_EMAIL=your_email@some_company.com
GOTRUE_REGISTERED_PASSWORD=your_password

Steps

1. Start the docker-compose

  • docker-compose up -d

2. Create registered user

Manual

  • send link to your email
curl localhost:9998/signup \
  --data-raw '{"email":"'"$GOTRUE_REGISTERED_EMAIL"'","password":"'"$GOTRUE_REGISTERED_PASSWORD"'"}' \
  --header 'Content-Type: application/json'
  • click on the link

Auto

  • skips the clicking on email
export GOTRUE_MAILER_AUTOCONFIRM=true
docker-compose up -d
source .env
curl localhost:9998/signup \
  --data-raw '{"email":"'"$GOTRUE_REGISTERED_EMAIL"'","password":"'"$GOTRUE_REGISTERED_PASSWORD"'"}' \
  --header 'Content-Type: application/json'

export GOTRUE_MAILER_AUTOCONFIRM=false
docker-compose up -d

3. Run test

  • cargo test