Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion features/execute.feature
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,16 @@ Feature: execute

@no-clobber
Scenario: No clones before running command when sourcecode have already been cloned
Given a basic setup with a puppet module "puppet-test" from "awesome"
And I successfully run `msync exec --verbose -- /bin/true`
Then the file "modules/awesome/puppet-test/metadata.json" should exist
When I successfully run `msync exec --verbose /bin/true`
Then the stdout should not contain "Cloning from 'file://"
Then the stdout from "msync exec --verbose /bin/true" should not contain "Cloning from 'file://'"

@no-clobber
Scenario: When command run fails and using default skip_broken value
Given a basic setup with a puppet module "puppet-test" from "awesome"
And I successfully run `msync exec --verbose -- /bin/true`
When I run `msync exec --verbose -- /bin/false`
Then the exit status should be 1
And the stderr should contain:
Expand All @@ -25,6 +29,8 @@ Feature: execute

@no-clobber
Scenario: When command run fails and using skip_broken
Given a basic setup with a puppet module "puppet-test" from "awesome"
And I successfully run `msync exec --verbose -- /bin/true`

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you intentionally skip -s?

When I run `msync exec --verbose -s -- /bin/false`
Then the exit status should be 1
And the stderr should contain:
Expand Down
6 changes: 4 additions & 2 deletions features/reset.feature
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,12 @@ Feature: reset

@no-clobber
Scenario: Reset when sourcecodes have already been cloned
Given the file "modules/awesome/puppet-test/metadata.json" should exist
Given a basic setup with a puppet module "puppet-test" from "awesome"
And the global option "branch" sets to "modulesync"
And I successfully run `msync reset --verbose`
Given the file "modules/awesome/puppet-test/metadata.json" should exist
When I successfully run `msync reset --verbose`
Then the output should not contain "Cloning from 'file://"
Then the output from "msync reset --verbose" should not contain "Cloning from 'file://'"
And the output should contain "Hard-resetting any local changes to repository in 'modules/awesome/puppet-test' from branch 'origin/master'"

Scenario: Reset after an upstream file addition
Expand Down
3 changes: 1 addition & 2 deletions features/step_definitions/git_steps.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@

Given 'a mocked git configuration' do
steps %(
Given a mocked home directory
And I run `git config --global user.name Aruba`
And I run `git config --global user.email aruba@example.com`
)
Expand All @@ -43,7 +42,7 @@

Given 'the global option {string} sets to {string}' do |key, value|
steps %(
Given the file "#{Aruba.config.working_directory}/modulesync.yml" appended with:
Given the file "#{aruba.home_directory}/modulesync.yml" appended with:
"""
#{key}: #{value}
"""
Expand Down
3 changes: 1 addition & 2 deletions features/support/env.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@

require_relative '../../spec/helpers/faker'

ModuleSync::Faker.working_directory = File.expand_path('faker', Aruba.config.working_directory)

Before do
@aruba_timeout_seconds = 5

aruba.config.activate_announcer_on_command_failure = %i[stdout stderr]
ModuleSync::Faker.working_directory = File.expand_path('faker', aruba.home_directory)
end
4 changes: 2 additions & 2 deletions modulesync.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ Gem::Specification.new do |spec|
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
spec.require_paths = ['lib']

spec.add_development_dependency 'aruba', '~>2.0'
spec.add_development_dependency 'cucumber', '~> 11.0'
spec.add_development_dependency 'aruba', '~> 3.0'
spec.add_development_dependency 'cucumber', '>= 11.0', '< 13'
spec.add_development_dependency 'rake', '~> 13.2', '>= 13.2.1'
spec.add_development_dependency 'rspec', '~> 3.13'
spec.add_development_dependency 'voxpupuli-rubocop', '~> 5.3.0'
Expand Down
Loading