Skip to main content

Suite of tools to manage daemons for testing

Project description

Overtest is a suite of tools that allows to start and stop daemons for a quick throw-away usage. This is typically useful when needing these daemons to run integration testing.

Supported daemons

Overtest currently supports:

  • PostgreSQL

Usage

To use Overtest, simply call the overtest-$daemon program that you need. It will setup the temporary environment and export a few environment variable for you to accesss it:

$ overtest-postgresql --exec psql template1
The files belonging to this database system will be owned by user "jd".
This user must also own the server process.

The database cluster will be initialized with locale "en_US.UTF-8".
The default database encoding has accordingly been set to "UTF8".
The default text search configuration will be set to "english".

Data page checksums are disabled.

fixing permissions on existing directory /var/folders/7k/pwdhb_mj2cv4zyr0kyrlzjx40000gq/T/overtest-postgresql-XXXXXX.MW00RvMv ... ok
creating subdirectories ... ok
selecting default max_connections ... 100
selecting default shared_buffers ... 128MB
selecting dynamic shared memory implementation ... posix
creating configuration files ... ok
creating template1 database in /var/folders/7k/pwdhb_mj2cv4zyr0kyrlzjx40000gq/T/overtest-postgresql-XXXXXX.MW00RvMv/base/1 ... ok
initializing pg_authid ... ok
initializing dependencies ... ok
creating system views ... ok
loading system objects' descriptions ... ok
creating collations ... ok
creating conversions ... ok
creating dictionaries ... ok
setting privileges on built-in objects ... ok
creating information schema ... ok
loading PL/pgSQL server-side language ... ok
vacuuming database template1 ... ok
copying template1 to template0 ... ok
copying template1 to postgres ... ok
syncing data to disk ... ok

WARNING: enabling "trust" authentication for local connections
You can change this by editing pg_hba.conf or using the option -A, or
--auth-local and --auth-host, the next time you run initdb.

Success. You can now start the database server using:

    /usr/local/Cellar/postgresql/9.4.5_2/bin/postgres -D /var/folders/7k/pwdhb_mj2cv4zyr0kyrlzjx40000gq/T/overtest-postgresql-XXXXXX.MW00RvMv
or
    /usr/local/Cellar/postgresql/9.4.5_2/bin/pg_ctl -D /var/folders/7k/pwdhb_mj2cv4zyr0kyrlzjx40000gq/T/overtest-postgresql-XXXXXX.MW00RvMv -l logfile start

waiting for server to start....LOG:  database system was shut down at 2016-01-05 17:12:24 CET
LOG:  MultiXact member wraparound protections are now enabled
LOG:  database system is ready to accept connections
LOG:  autovacuum launcher started
 done
server started
I: executing command: psql template1
Expanded display is used automatically.
Line style is unicode.
SET
psql (9.4.5)
Type "help" for help.

template1=# \l
                              List of databases
   Name    │ Owner │ Encoding │   Collate   │    Ctype    │ Access privileges
───────────┼───────┼──────────┼─────────────┼─────────────┼───────────────────
 postgres  │ jd    │ UTF8     │ en_US.UTF-8 │ en_US.UTF-8 │
 template0 │ jd    │ UTF8     │ en_US.UTF-8 │ en_US.UTF-8 │ =c/jd            ↵
           │       │          │             │             │ jd=CTc/jd
 template1 │ jd    │ UTF8     │ en_US.UTF-8 │ en_US.UTF-8 │ =c/jd            ↵
           │       │          │             │             │ jd=CTc/jd
(3 rows)

template1=# \q
waiting for server to shut down....LOG:  received smart shutdown request
LOG:  autovacuum launcher shutting down
LOG:  shutting down
LOG:  database system is shut down
 done
server stopped

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

overtest-0.0.1.dev12.tar.gz (5.1 kB view details)

Uploaded Source

File details

Details for the file overtest-0.0.1.dev12.tar.gz.

File metadata

File hashes

Hashes for overtest-0.0.1.dev12.tar.gz
Algorithm Hash digest
SHA256 6059dcabf5120df8589a3d078713f7ebd0d49e83821f5dfbb9785f71b15718a0
MD5 55c3d5c6bc2b47b4207b3fa00d54c954
BLAKE2b-256 869306387cf80b73e07ce4b8536cf2eea252da7820ea8266ccaca09fc28944a9

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page