about summary refs log tree commit diff
path: root/tests/create-accounts.sh
diff options
context:
space:
mode:
authorWilliam Carroll <wpcarro@gmail.com>2020-07-28T17·48+0100
committerWilliam Carroll <wpcarro@gmail.com>2020-07-28T17·48+0100
commitf051b0be0bc360c949b3b1913f13c4856ae317ca (patch)
tree0c01f2c7d62625fc710d965fdc430777c9d52442 /tests/create-accounts.sh
parent90a521c78f036e024454df39c3e3cd1180c90a74 (diff)
Check passwords in /login
TL;DR:
- Since POST /login is more rigorous, our accounts.csv needs to contain validly
  hashed passwords; you can use tests/create-accounts.sh to create dummy
  accounts

I still need to test the login flow and support:
- Tracking failed attempts (three maximum)
- Verifying accounts by sending emails to the users
Diffstat (limited to 'tests/create-accounts.sh')
-rwxr-xr-xtests/create-accounts.sh21
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/create-accounts.sh b/tests/create-accounts.sh
new file mode 100755
index 000000000000..8c2a66bc8bd7
--- /dev/null
+++ b/tests/create-accounts.sh
@@ -0,0 +1,21 @@
+#!/usr/bin/env sh
+
+# This script populates the Accounts table over HTTP.
+
+http POST :3000/accounts \
+  username=mimi \
+  password=testing \
+  email=miriamwright@google.com \
+  role=user
+
+http POST :3000/accounts \
+  username=bill \
+  password=testing \
+  email=wpcarro@gmail.com \
+  role=manager
+
+http POST :3000/accounts \
+  username=wpcarro \
+  password=testing \
+  email=wpcarro@google.com \
+  role=admin