Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(feature) Test integration with Cucumber / Aruba #1

Merged
merged 1 commit into from
Nov 15, 2018

Conversation

edavey
Copy link
Contributor

@edavey edavey commented Nov 15, 2018

This integration test uses a Terrafile which lists 2 modules, one of
whose 'version' is a tag and the other with a SHA for its 'version'.

We exercise the full stack -- i.e. git clones and pulls and checks out.

We use Aruba library for testing command-line apps:

https://app.cucumber.pro/projects/aruba/documents/branch/master/features/0/README.md

It tidies up after the tests are run, removing files created /
downloaded from the tmp/aruba/ directory.

The process of writing these integration tests resulted in a few
changes:

  • we move MODULES_PATH constant to the Terrafile namespace from
    Installer. Makes more sense, and now joins the TERRAFILE_PATH.

  • when shelling out via Open3.capture3(cmd) we only ever now send
    STDOUT to dev null. If the cmd exits non-zero we now always have
    useful error information from STDERR passed on to
    the Terrafile::Error message.

  • we no longer do a 'shallow' git clone as this is incompatible
    ('reference is not a tree' error) with our later git checkout %{version}

This integration test uses a Terrafile which lists 2 modules, one of
whose 'version' is a tag and the other with a SHA for its 'version'.

We exercise the full stack -- i.e. git clones and pulls and checks out.

We use Aruba library for testing command-line apps:

https://app.cucumber.pro/projects/aruba/documents/branch/master/features/0/README.md

It tidies up after the tests are run, removing files created /
downloaded from the `tmp/aruba/` directory.

The process of writing these integration tests resulted in a few
changes:

- we move `MODULES_PATH` constant to the `Terrafile` namespace from
`Installer`. Makes more sense, and now joins the `TERRAFILE_PATH`.

- when shelling out via `Open3.capture3(cmd)` we only ever now send
STDOUT to dev null. If the cmd exits non-zero we now always have
useful error information from STDERR passed on to
the `Terrafile::Error` message.

- we no longer do a 'shallow' `git clone` as this is incompatible
('reference is not a tree' error) with our later `git checkout %
{version}`
@edavey edavey merged commit 7217890 into master Nov 15, 2018
@edavey edavey deleted the EXPERIMENT/integration-with-cuke-aruba branch November 15, 2018 08:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant