mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-28 14:03:48 +03:00
d541a14826
- 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 |
||
---|---|---|
.. | ||
admin | ||
content | ||
README.md |
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