Sha256: b7f35861239347bfc0aa8aad426ab959d3f7bcd9b0105ddc4aa5055133a9222a

Contents?: true

Size: 1.1 KB

Versions: 22

Compression:

Stored size: 1.1 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 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 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

22 entries across 22 versions & 1 rubygems

Version Path
hammer_cli_foreman-0.18.2 test/data/README.md
hammer_cli_foreman-0.18.1 test/data/README.md
hammer_cli_foreman-0.17.2 test/data/README.md
hammer_cli_foreman-0.18.0 test/data/README.md
hammer_cli_foreman-0.17.1 test/data/README.md
hammer_cli_foreman-0.17.0 test/data/README.md
hammer_cli_foreman-0.15.2 test/data/README.md
hammer_cli_foreman-0.16.0 test/data/README.md
hammer_cli_foreman-0.15.1 test/data/README.md
hammer_cli_foreman-0.15.0 test/data/README.md
hammer_cli_foreman-0.14.0 test/data/README.md
hammer_cli_foreman-0.13.2 test/data/README.md
hammer_cli_foreman-0.13.1 test/data/README.md
hammer_cli_foreman-0.13.0 test/data/README.md
hammer_cli_foreman-0.12.1 test/data/README.md
hammer_cli_foreman-0.12.0 test/data/README.md
hammer_cli_foreman-0.11.0 test/data/README.md
hammer_cli_foreman-0.10.2 test/data/README.md
hammer_cli_foreman-0.10.1 test/data/README.md
hammer_cli_foreman-0.10.0 test/data/README.md