Skip to content

Commit

Permalink
Add Ansible role bootstrapping to Drumkit
Browse files Browse the repository at this point in the history
  • Loading branch information
lamech committed Aug 1, 2019
1 parent 3e4ac11 commit 60f7899
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 1 deletion.
10 changes: 10 additions & 0 deletions features/bootstrap/Drumkit/DrumkitContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,16 @@ public function iBootstrapThisCode()
$this->iRun("bash -c 'shopt -s dotglob && cp -r " . $this->getOrigDir() . "/* .'");
}

/**
* @Given I bootstrap this Ansible role
*/
public function iBootstrapThisAnsibleRole()
{
$this->iBootstrapDrumkit();
#$this->iRun("cp -r " . $this->getOrigDir() . "/.mk .");
$this->iRun("mkdir roles && cp -r " . $this->getOrigDir() . " ./roles");
}

/**
* @Then the file :file should contain:
*/
Expand Down
24 changes: 23 additions & 1 deletion features/testing.feature
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Feature: Testing tools
In order to test
As a developer
I need to be able to ensure the proper tools are installed
I need to ensure the proper tools are installed and working

Scenario: Check that Behat is installed (via Drumkit)
Given I bootstrap Drumkit
Expand All @@ -22,3 +22,25 @@ Feature: Testing tools
Drumkit\DrumkitContext
Drupal\DrupalExtension\Context\MinkContext
"""

@ansible
Scenario: Check that DrumkitContext can bootstrap Ansible role code for testing
# This might look a bit weird, because it'll bootstrap Drumkit itself as if it were an Ansible role
Given I bootstrap this Ansible role
And I run "ls -la .mk"
Then I should get:
"""
GNUmakefile
d
"""
And I run "ls -la roles"
Then I should get:
"""
.mk
"""
And I run "ls -la roles/.mk"
Then I should get:
"""
GNUmakefile
d
"""

0 comments on commit 60f7899

Please sign in to comment.