Sha256: 9061f11341c611187bd0685af37a1611cb0c470bde2adea8834a1b2c7cf00e1d

Contents?: true

Size: 1.12 KB

Versions: 38

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'] || '1.10')
    ```
 1. make sure the tests are green

Version data entries

38 entries across 38 versions & 1 rubygems

Version Path
hammer_cli_foreman-3.14.0 test/data/README.md
hammer_cli_foreman-3.13.0 test/data/README.md
hammer_cli_foreman-3.12.0 test/data/README.md
hammer_cli_foreman-3.10.0 test/data/README.md
hammer_cli_foreman-3.9.0 test/data/README.md
hammer_cli_foreman-3.8.0 test/data/README.md
hammer_cli_foreman-3.7.0 test/data/README.md
hammer_cli_foreman-3.5.1 test/data/README.md
hammer_cli_foreman-3.6.0 test/data/README.md
hammer_cli_foreman-3.5.0 test/data/README.md
hammer_cli_foreman-3.4.0 test/data/README.md
hammer_cli_foreman-3.3.0 test/data/README.md
hammer_cli_foreman-3.2.0 test/data/README.md
hammer_cli_foreman-2.5.2 test/data/README.md
hammer_cli_foreman-3.1.0 test/data/README.md
hammer_cli_foreman-3.0.0 test/data/README.md
hammer_cli_foreman-2.5.1 test/data/README.md
hammer_cli_foreman-2.5.0 test/data/README.md
hammer_cli_foreman-2.3.2 test/data/README.md
hammer_cli_foreman-2.4.0 test/data/README.md