FormidableLabs / aws-lambda-dogs

AWS Lambda REST API for our beloved doggos.
MIT License
3 stars 0 forks source link

Bug: DB reset doesn't work. #22

Open ryan-roemer opened 3 years ago

ryan-roemer commented 3 years ago

Reproduction:

# Update Rusty's name in read-write datastore.
$ curl -X PATCH "https://30lxcuxu8d.execute-api.us-east-1.amazonaws.com/sandbox/dogs/cLnG8C2d_" \
  --data name="Rustinus B. Rutherford" \
  --header "x-dogs-api-key: <key>"

$ curl "https://30lxcuxu8d.execute-api.us-east-1.amazonaws.com/sandbox/dogs/cLnG8C2d_" \
  --header "x-dogs-api-key: <key>"

# EXPECTED/ACTUAL: Name is Rustinus B. Rutherford

# Reset the read-write datastore back to original state.
$ curl -X POST "https://30lxcuxu8d.execute-api.us-east-1.amazonaws.com/sandbox/reset" \
  --header "x-dogs-api-key: <key>"

$ curl "https://30lxcuxu8d.execute-api.us-east-1.amazonaws.com/sandbox/dogs/cLnG8C2d_" \
  --header "x-dogs-api-key: <key>"

# EXPECTED: Name is back to Rusty
# ACTUAL: Name is still Rustinus B. Rutherford