# onetimeserver **Repository Path**: mirrors_debezium/onetimeserver ## Basic Information - **Project Name**: onetimeserver - **Description**: Bring up and tear down mysql instances for test environments - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2024-10-31 - **Last Updated**: 2026-05-23 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # onetimeserver this is onetimeserver, a collection of utilities for spinning up daemons(currently only mysql) in the context of a test process, and then throwing them away at the end. ## how to use it download the onetimeserver wrapper script: ``` curl https://raw.githubusercontent.com/osheroff/onetimeserver/master/onetimeserver > onetimeserver ``` In your test suite, execute the script: ``` require 'json' server = JSON.parse(`onetimeserver -m 5.5`) # mysql 5.5 and 5.6 are currently supported puts server ``` use the server for the life of your test suite. It'll be killed and removed after your suite exits. *note* if you find that your mysql is mysteriouly dying on you, you may need to pass in the test suite's master pid with "--parent-pid". ## architecture 1. shell script. bootstraps the wrapper and the golang bits 2. wrapper in C. There because go can't seem to fork() properly. forks and redirects STDOUT and STDERR to a file, then waits for a signal from the golang utility that the server has come up properly, and then exits, outputting information about the server in JSON. 3. main utility, written in golang. responsible for configuring and booting the server.