Sha256: 27da06444cbd0a92f6f6ebc42ceefb0493bcf38bd4a5200c8b9d90632e9a591d

Contents?: true

Size: 1.05 KB

Versions: 75

Compression:

Stored size: 1.05 KB

Contents

require 'git_utils'
require 'r10k_utils'
require 'master_manipulator'
test_name 'CODEMGMT-63 - C62511 - Attempt to Deploy Environment Containing Invalid Character in Name'

#Init
git_environments_path = '/root/environments'
last_commit = git_last_commit(master, git_environments_path)
invalid_env_name = 'should-not-contain-dashes'
r10k_fqp = get_r10k_fqp(master)

#Verification
error_message_regex = /ERROR\]/

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

#Setup
step "Create \"#{invalid_env_name}\" Branch from \"production\""
git_on(master, 'checkout production', git_environments_path)
git_on(master, "checkout -b #{invalid_env_name}", git_environments_path)

step "Push Changes to \"#{invalid_env_name}\" Environment"
git_push(master, invalid_env_name, git_environments_path)

#Tests
step 'Attempt to Deploy via r10k'
on(master, "#{r10k_fqp} deploy environment -v") do |result|
  expect_failure('Expected to fail due to CODEMGMT-65') do
    assert_match(error_message_regex, result.stderr, 'Expected message not found!')
  end
end

Version data entries

75 entries across 75 versions & 2 rubygems

Version Path
r10k-5.0.0 integration/tests/user_scenario/basic_workflow/negative/neg_invalid_env_name.rb
r10k-4.1.0 integration/tests/user_scenario/basic_workflow/negative/neg_invalid_env_name.rb
r10k-4.0.2 integration/tests/user_scenario/basic_workflow/negative/neg_invalid_env_name.rb
r10k-4.0.1 integration/tests/user_scenario/basic_workflow/negative/neg_invalid_env_name.rb
r10k-4.0.0 integration/tests/user_scenario/basic_workflow/negative/neg_invalid_env_name.rb
r10k-4.0.0.pre integration/tests/user_scenario/basic_workflow/negative/neg_invalid_env_name.rb
r10k-3.16.0 integration/tests/user_scenario/basic_workflow/negative/neg_invalid_env_name.rb
r10k-3.15.4 integration/tests/user_scenario/basic_workflow/negative/neg_invalid_env_name.rb
r10k-3.15.3 integration/tests/user_scenario/basic_workflow/negative/neg_invalid_env_name.rb
r10k-3.15.2 integration/tests/user_scenario/basic_workflow/negative/neg_invalid_env_name.rb
r10k-3.15.1 integration/tests/user_scenario/basic_workflow/negative/neg_invalid_env_name.rb
r10k-3.15.0 integration/tests/user_scenario/basic_workflow/negative/neg_invalid_env_name.rb
akerl-r10k-3.14.2.1 integration/tests/user_scenario/basic_workflow/negative/neg_invalid_env_name.rb
r10k-3.14.2 integration/tests/user_scenario/basic_workflow/negative/neg_invalid_env_name.rb
r10k-3.14.1 integration/tests/user_scenario/basic_workflow/negative/neg_invalid_env_name.rb
r10k-3.14.0 integration/tests/user_scenario/basic_workflow/negative/neg_invalid_env_name.rb
r10k-3.13.0 integration/tests/user_scenario/basic_workflow/negative/neg_invalid_env_name.rb
r10k-3.12.1 integration/tests/user_scenario/basic_workflow/negative/neg_invalid_env_name.rb
r10k-3.12.0 integration/tests/user_scenario/basic_workflow/negative/neg_invalid_env_name.rb
r10k-3.11.0 integration/tests/user_scenario/basic_workflow/negative/neg_invalid_env_name.rb