Skip to content

Commit

Permalink
Merge pull request #73 from voxpupuli/modulesync
Browse files Browse the repository at this point in the history
Add http_conn_validator acceptance tests
  • Loading branch information
bastelfreak authored May 2, 2023
2 parents dc532c5 + 974dbf5 commit b372380
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .rubocop_todo.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This configuration was generated by
# `rubocop --auto-gen-config`
# on 2023-04-18 06:46:55 UTC using RuboCop version 1.22.3.
# on 2023-04-18 12:56:51 UTC using RuboCop version 1.22.3.
# The point is for the user to remove these configuration records
# one by one as the offenses are removed from the code base.
# Note that changes in the inspected code, or installation of new
Expand All @@ -12,6 +12,11 @@ Lint/UriRegexp:
Exclude:
- 'lib/puppet_x/puppet-community/http_validator.rb'

# Offense count: 2
RSpec/RepeatedExampleGroupBody:
Exclude:
- 'spec/acceptance/init_spec.rb'

# Offense count: 6
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle.
Expand Down
21 changes: 21 additions & 0 deletions spec/acceptance/init_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,28 @@
host => '127.0.0.1',
port => 22,
}
-> file { '/tmp/hello':
content => "Hi!\n",
}
http_conn_validator { 'github https test':
host => 'api.github.com',
port => '443',
expected_code => 200,
verify_peer => false,
use_ssl => true,
timeout => 5,
}
-> file { '/tmp/foo':
content => "Hi!\n",
}
PUPPET
end
end
describe file('/tmp/hello') do
it { is_expected.to be_file }
end

describe file('/tmp/foo') do
it { is_expected.to be_file }
end
end

0 comments on commit b372380

Please sign in to comment.