Skip to content

Testing pure for dummies

Jorge Bucaran edited this page Feb 21, 2019 · 6 revisions

Design Principles

Tests are run in a Docker image, based on the oh-my-fish one.

For technical details refer to tools/pure-on-fish.Dockerfile.

Requirements

Why docker?

To:

  • prevent pollution of user's environment who run tests ;
  • have identical context between the developer and continuous integration environments ;
  • work against multiple fish versions ;
  • provide a way to reproduce the bug in a controlled environment ;
  • quickly debug for a given version.

Usage

  • Running tests outside of the container is possible but will temper with your pure configuration. Instead, use our makefile.
  • For each action you can specify a supported fish version using FISH_VERSION variable.
  • Live usage are available in our .travis.yml.

Build pure

Build against a specific fish version:

make build-pure-on FISH_VERSION=3.0.0

Test pure

Run tests against a specific fish version you already built (cf. above section):

make test-pure-on FISH_VERSION=3.0.0

Develop pure

Create a container with source directory mounted:

make dev-pure-on FISH_VERSION=3.0.0
Clone this wiki locally