Sha256: e285d25e6a557ede3096feca40f540a662fd281a386d3f6de58d2e289188ed8d

Contents?: true

Size: 941 Bytes

Versions: 5

Compression:

Stored size: 941 Bytes

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 rake test:functionals
    ```
 1. on the **Foreman instance** generate API documentation cache. It will land in `/usr/share/foreman/public/apipie-cache/apidoc.json`

    ```bash
    $ FOREMAN_APIPIE_LANGS=en foreman-rake apipie:cache
    ```
 1. in **hammer-cli-foreman** in `test/unit/data/` Create directory with name matching the Foreman version in `test/unit/data/` (e.g. `test/unit/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/unit/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

5 entries across 5 versions & 1 rubygems

Version Path
hammer_cli_foreman-0.6.2 test/data/README.md
hammer_cli_foreman-0.6.1 test/data/README.md
hammer_cli_foreman-0.6.0 test/data/README.md
hammer_cli_foreman-0.5.1 test/unit/data/README.md
hammer_cli_foreman-0.5.0 test/unit/data/README.md