Ghost/test/api-acceptance
Hannah Wolfe d541a14826 Change theme uploads to move & delete at end
- Currently theme uploads delete the existing theme before copying the new files into place
- If something goes wrong with the delete action, you will end up in a bad state
   - Some or all of the files may be deleted, but now Ghost won't try to put the new theme in place, instead returning an error
   - This leaves you with an invalid active theme and a broken site
- Unlike delete, move is a one-hit operation that succeeds or fails, there moving a theme is safer than deleting
- This updated code moves the old theme to a folder with the name [theme-name]-[uuid] before copying the new theme into place
- Even if this fails, the files should not be gone
- There's a cleanup operation to remove the theme backup at the end, but we don't care too much if this fails
2020-06-08 16:12:17 +01:00
..
admin Change theme uploads to move & delete at end 2020-06-08 16:12:17 +01:00
content Moved config from server to shared (#11850) 2020-05-27 18:47:53 +01:00
README.md Move tests from core to root (#11700) 2020-03-30 16:26:47 +01:00

Acceptance Tests

This folder should only contain a set of basic API use cases.

We are currently refactoring the test env. The "old" folder currently contains all API tests for the stable API version (v2). The goal is:

  • either keep a test if it's a basic use case e.g. upload an image, schedule a post, download a theme
  • otherwise move the test to regression api v2 tests

We probably need a differentiation for the acceptance tests for session and api_key authentication.

Before we move tests:

  • we have to re-work how are test utility is structured
  • we have to reduce tests