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
- CLI vs GitHub function deployment size a...
What are the reasons why my build time and size are so drastictally different based on my deployment source? GitHub 3m build time of 26.2 MB vs CLI 8s build t...
- Weird behavior with functions in Appwrit...
Hello there! I have my appwrite instance hosted in this domain -> backend.dcvocabulary.com Everything is working fine. I had a function working a few months a...
- Next.js 14 + tRPC + Appwrite: Session co...
I'm building a Next.js 14 application with tRPC and Appwrite for authentication as a way to further my learning, so I may have aspects of this wrong. This is a ...