mjl- / mox

modern full-featured open source secure mail server for low-maintenance self-hosted email
https://www.xmox.nl
MIT License
3.71k stars 113 forks source link

Feature: Add an option to mox localserve to just create the data folder and quit #89

Closed naturalethic closed 1 year ago

naturalethic commented 1 year ago

I use localserve to run some end-to-end tests, adding an --exit option, or something similar to just create the data folder and quit would be helpful.

mjl- commented 1 year ago

i added a flag -initonly. are you doing additional config changes after creating the configs and launching mox localserve? i'm just wondering why just starting mox localserve on a missing/empty directory wouldn't be enough.

naturalethic commented 1 year ago

Awesome thanks!

Running the e2e tests currently has 4 steps. This allows me to remove 2 of them.

In detail:

Current procedure:

  1. Wipe current mox data if any.
  2. Start mox to create new data.
  3. Backup that data.
  4. Run tests: Before each test, restore that data.

New procedure:

  1. Start mox, new or old data will be overwritten by 2
  2. Run tests: Before each test, wipe data, run separate mox to create fresh data to overwrite main mox data
naturalethic commented 1 year ago

Thanks again! https://github.com/naturalethic/Moxie/commit/f5a31be8c519951e2d50cccacce4908c7999ea09