Sha256: ae008300799df0ce9e9d7e5df835fb398d3ec9865c86ac43f18f2820fe226844

Contents?: true

Size: 1.57 KB

Versions: 68

Compression:

Stored size: 1.57 KB

Contents

require 'git_utils'
require 'r10k_utils'
test_name 'CODEMGMT-127 - C64121 - Attempt to Deploy Environment with Forge Module Specified at Deleted Release' 

#This test uses the spotty module at https://forge-aio01-petest.puppetlabs.com//puppetlabs/spotty, with valid released 0.1.0 and 0.3.0 versions, and deleted 0.2.0 and 0.4.0 versions.

#Init
git_environments_path = '/root/environments'
last_commit = git_last_commit(master, git_environments_path)
r10k_fqp = get_r10k_fqp(master)

#Verification
if get_puppet_version(master) < 4.0
  error_notification_regex = /No releases matching '0.2.0'/
else
  error_notification_regex = /error.* -> The module release puppetlabs-spotty-0.2.0 does not exist on/i
end

#File
puppet_file = <<-PUPPETFILE
mod "puppetlabs/spotty", '0.2.0'
PUPPETFILE

puppet_file_path = File.join(git_environments_path, 'Puppetfile')

#Teardown
teardown do
  clean_up_r10k(master, last_commit, git_environments_path)
end

#Setup
step 'Stub Forge on Master'
stub_forge_on(master)

#Tests
step 'Checkout "production" Branch'
git_on(master, 'checkout production', git_environments_path)

step 'Create "Puppetfile" for the "production" Environment'
create_remote_file(master, puppet_file_path, puppet_file)

step 'Push Changes'
git_add_commit_push(master, 'production', 'Add module.', git_environments_path)

#Tests
step "Deploy production environment via r10k with module specified at deleted version"
on(master, "#{r10k_fqp} deploy environment -p -v", :acceptable_exit_codes => 1) do |result|
  assert_match(error_notification_regex, result.stderr, 'Unexpected error was detected!')
end

Version data entries

68 entries across 68 versions & 2 rubygems

Version Path
r10k-2.6.5 integration/tests/user_scenario/basic_workflow/negative/neg_module_specified_at_deleted_release.rb
r10k-3.0.3 integration/tests/user_scenario/basic_workflow/negative/neg_module_specified_at_deleted_release.rb
r10k-3.0.2 integration/tests/user_scenario/basic_workflow/negative/neg_module_specified_at_deleted_release.rb
r10k-3.0.1 integration/tests/user_scenario/basic_workflow/negative/neg_module_specified_at_deleted_release.rb
r10k-3.0.0 integration/tests/user_scenario/basic_workflow/negative/neg_module_specified_at_deleted_release.rb
r10k-2.6.4 integration/tests/user_scenario/basic_workflow/negative/neg_module_specified_at_deleted_release.rb
r10k-2.6.3 integration/tests/user_scenario/basic_workflow/negative/neg_module_specified_at_deleted_release.rb
r10k-2.6.2 integration/tests/user_scenario/basic_workflow/negative/neg_module_specified_at_deleted_release.rb
r10k-2.6.1 integration/tests/user_scenario/basic_workflow/negative/neg_module_specified_at_deleted_release.rb
r10k-2.6.0 integration/tests/user_scenario/basic_workflow/negative/neg_module_specified_at_deleted_release.rb
r10k-2.5.5 integration/tests/user_scenario/basic_workflow/negative/neg_module_specified_at_deleted_release.rb
r10k-2.5.4 integration/tests/user_scenario/basic_workflow/negative/neg_module_specified_at_deleted_release.rb
r10k-2.5.3 integration/tests/user_scenario/basic_workflow/negative/neg_module_specified_at_deleted_release.rb
r10k-2.5.2 integration/tests/user_scenario/basic_workflow/negative/neg_module_specified_at_deleted_release.rb
r10k-2.5.1 integration/tests/user_scenario/basic_workflow/negative/neg_module_specified_at_deleted_release.rb
r10k-2.4.5 integration/tests/user_scenario/basic_workflow/negative/neg_module_specified_at_deleted_release.rb
r10k-2.3.1 integration/tests/user_scenario/basic_workflow/negative/neg_module_specified_at_deleted_release.rb
r10k-2.4.4 integration/tests/user_scenario/basic_workflow/negative/neg_module_specified_at_deleted_release.rb
r10k-2.5.0 integration/tests/user_scenario/basic_workflow/negative/neg_module_specified_at_deleted_release.rb
r10k-2.4.3 integration/tests/user_scenario/basic_workflow/negative/neg_module_specified_at_deleted_release.rb