In my project I want to test my business logic using unit tests (vitest). To do that efficiently (without mocking full appwrite SDK) I have created a test project on my appwrite instance. To keep databases in sync between dev and test I use appwrite cli. First pulling the dev state:
# Login to server
appwrite login
# Init my dev project
appwrite project init
# Download all config to appwrite.json
appwrite pull all
After that I use appwrite client
to get a temporary connection to the test project.
I then delete the existing test db and push all collections
appwrite database delete --database-id mydb
appwrite push collections --all -- force
My expectation would be that this does NOT modify my appwrite.json when I only push. And the appwrite client
command should also be only temporary.
However my appwrite.json
now has the test project in projectId
and projectName
and no longer the dev
project. This now means that I need to run appwrite login
again if I want to make changes to dev or pull changes of others.
Is this inteded behaviour? Can this be made configurable? Would help with scripting/automation
Recommended threads
- Send Email Verification With REST
I am using REST to create a user on the server side after receiving form data from the client. After the account is successfully created i wanted to send the v...
- Use different email hosts for different ...
Hello, I have 2 projects and i want to be able to set up email templates in the projects. Both projects will have different email host configurations. I see ...
- Migrate from cloud to localhost
Hello everyone. I need to migrate my test project from cloud to localhost, however it seems that this is possible only if a self-hosted appwrite instance it's h...