Sha256: 0498e2f89133d26f2ec2a45a9ce1ff1074f7b0d7876bdaa8de05bfae1f3b867f

Contents?: true

Size: 1.12 KB

Versions: 7

Compression:

Stored size: 1.12 KB

Contents

# Data for tests

## How to include API tests for new Foreman release

 1. on the **foreman instance** run the tests with recording of examples turned on

    ```bash
    $ APIPIE_RECORD=examples bundle exec rake test:functionals
    ```
 1. on the **Foreman instance** generate API documentation cache. It will land in `/usr/share/foreman/public/apipie-cache/apidoc/v2.en.json`

    ```bash
    $ FOREMAN_APIPIE_LANGS=en foreman-rake apipie:cache
    ```
 1. when running from **git**, run a similar command and it will land in `$FOREMAN_CHECKOUT/public/apipie-cache/apidoc/v2.en.json`

    ```bash
    $ FOREMAN_APIPIE_LANGS=en bundle exec rake apipie:cache
    ```
 1. in **hammer-cli-foreman** in `test/data/` Create directory with name matching the Foreman version in `test/data/` (e.g. `test/data/1.10`)
 1. copy the API cache from the Foreman instance into the newly created directory and name it as `foreman_api.json`
 1. update the following line in `test/test_helper.rb` to match the new default Foreman version

    ```ruby
    FOREMAN_VERSION = Gem::Version.new(ENV['TEST_API_VERSION'] || '3.0')
    ```
 1. make sure the tests are green

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
hammer_cli_foreman_puppet-0.0.7 test/data/README.md
hammer_cli_foreman_puppet-0.0.6 test/data/README.md
hammer_cli_foreman_puppet-0.0.5 test/data/README.md
hammer_cli_foreman_puppet-0.0.4 test/data/README.md
hammer_cli_foreman_puppet-0.0.3 test/data/README.md
hammer_cli_foreman_puppet-0.0.2 test/data/README.md
hammer_cli_foreman_puppet-0.0.1 test/data/README.md