Skip to main content

Nose plugin for automating mongodb for tests runs.

Project description

A nose plugin that automates the creation and teardown of a mongodb instance as part of test runs.

Installation

Grab the package off pypi:

easy_install mongonose

Its automatically picked up via entry points as a nose plugin.

Usage

The plugin extends the nose options with a few options. The only required options are either –mongodb or –mongodb-bin to enable the plugin.

  • –mongodb is required to enable the mongodb plugin.

  • –mongodb-bin Allows specifying the path to the mongod binary. If not specified the plugin will search the path for a mongodb binary. If one is not found, an error will be raised.

  • –mongodb-port can be optionally set, by default the plugin will utilize a a random open port on the machine.

  • –mongodb-scripting Enables the javascript scripting engine, off by default.

  • –mongodb-logpath Stores the server log at the given path, by default sent to /dev/null

  • –mongodb-prealloc Enables pre-allocation of databases, default is off. Modern filesystems will sparsely allocate, which can speed up test execution.

The plugin will populate the environment variable “TEST_MONGODB” which contains the location to the mongodb server in host:port format.

Tests should use this environment variable value when connecting to mongodb.

Todo

  • support replica sets

Authors

Kapil Thangavelu

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

mongonose-0.5.0.tar.gz (4.0 kB view details)

Uploaded Source

File details

Details for the file mongonose-0.5.0.tar.gz.

File metadata

  • Download URL: mongonose-0.5.0.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for mongonose-0.5.0.tar.gz
Algorithm Hash digest
SHA256 0e9e085b449f7766c154a0db22061e1ff9f3c7a2c571182c95d07d52d5165d62
MD5 e3e172b34a031b492a2ff2853dee9a0d
BLAKE2b-256 8472552b31d29c9ab55e25b23d77dcd60e46f83ba8d0eea64aa514831858743f

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