<commit_before>require 'spec_helper'

# Check if we're on origin and master
describe command('git --git-dir=/etc/puppet/.git/ branch -vv') do
  its(:stdout) { should match Regexp.new('^\* master\s+[0-9a-z]+ \[origin/master\].*') }
end

# Check if origin is correct one
describe command('git --git-dir=/etc/puppet/.git/ remote -v') do
  its(:stdout) {should match Regexp.new('^origin\s+git@github.com:gooddata/puppet-cloud.git.*') }
end

# Desired puppet version
describe package('puppet') do
  its(:version) { should >= '3.6' }
end

# puppet 3.6 compatibility
describe file('/etc/puppet/puppet.conf') do
  it {should_not contain 'modulepath'}
  it {should_not contain 'manifest'}
end<commit_msg>TEST: PCI-4147 Check for correct oam-puppet-cloud version<commit_after>require 'spec_helper'

# Check if we're on origin and master
describe command('git --git-dir=/etc/puppet/.git/ branch -vv') do
  its(:stdout) { should match Regexp.new('^\* master\s+[0-9a-z]+ \[origin/master\].*') }
end

# Check if origin is correct one
describe command('git --git-dir=/etc/puppet/.git/ remote -v') do
  its(:stdout) {should match Regexp.new('^origin\s+git@github.com:gooddata/puppet-cloud.git.*') }
end

# Desired puppet version
describe package('puppet') do
  its(:version) { should >= '3.6' }
end

# puppet 3.6 compatibility
describe file('/etc/puppet/puppet.conf') do
  it {should_not contain 'modulepath'}
  it {should_not contain 'manifest'}
end

describe command('rpm -q --queryformat "%{version}-%{release}" oam-puppet-cloud') do
  its(:stdout) { should eq '1.0-6' }
end
{'fraction_non_alphanumeric': 0.1697629724535554, 'fraction_numerical': 0.012171684817424727, 'mean_word_length': 4.404844290657439, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7461110', 'n_tokens_mistral': 580, 'n_tokens_neox': 551, 'n_words': 145}