Skip to content

Commit

Permalink
Merge pull request #334 from voxpupuli/modulesync
Browse files Browse the repository at this point in the history
modulesync 7.0.0
  • Loading branch information
bastelfreak committed Aug 18, 2023
2 parents 145b3e7 + a823f13 commit e88c59d
Show file tree
Hide file tree
Showing 7 changed files with 64 additions and 48 deletions.
2 changes: 1 addition & 1 deletion .msync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
# Managed by modulesync - DO NOT EDIT
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/

modulesync_config_version: '6.0.0'
modulesync_config_version: '7.0.0'
2 changes: 2 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
---
inherit_from: .rubocop_todo.yml

# Managed by modulesync - DO NOT EDIT
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/

Expand Down
13 changes: 13 additions & 0 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# This configuration was generated by
# `rubocop --auto-gen-config`
# on 2023-08-17 21:32:59 UTC using RuboCop version 1.50.2.
# 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
# versions of RuboCop, may require this file to be generated again.

# Offense count: 1
# This cop supports unsafe autocorrection (--autocorrect-all).
RSpec/BeEq:
Exclude:
- 'spec/unit/puppet/provider/grafana_plugin/grafana_cli_spec.rb'
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
source ENV['GEM_SOURCE'] || 'https://rubygems.org'

group :test do
gem 'voxpupuli-test', '~> 6.0', :require => false
gem 'voxpupuli-test', '~> 7.0', :require => false
gem 'coveralls', :require => false
gem 'simplecov-console', :require => false
gem 'puppet_metadata', '~> 3.0', :require => false
Expand Down
6 changes: 3 additions & 3 deletions spec/acceptance/grafana_team_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ class { 'grafana':
end

it 'creates team on organization' do
shell('curl --user admin:admin -X POST http://localhost:3000/api/user/using/2 && '\
shell('curl --user admin:admin -X POST http://localhost:3000/api/user/using/2 && ' \
'curl --user admin:admin http://localhost:3000/api/teams/search?name=example-team-on-org') do |f|
expect(f.stdout).to match(%r{example-team-on-org})
end
Expand Down Expand Up @@ -198,14 +198,14 @@ class { 'grafana':
end

it 'has no example-team' do
shell('curl --user admin:admin -X POST http://localhost:3000/api/user/using/1 && '\
shell('curl --user admin:admin -X POST http://localhost:3000/api/user/using/1 && ' \
'curl --user admin:admin http://localhost:3000/api/teams/search') do |f|
expect(f.stdout).not_to match(%r{example-team})
end
end

it 'has no example-team-on-org' do
shell('curl --user admin:admin -X POST http://localhost:3000/api/user/using/2 && '\
shell('curl --user admin:admin -X POST http://localhost:3000/api/user/using/2 && ' \
'curl --user admin:admin http://localhost:3000/api/teams') do |f|
expect(f.stdout).not_to match(%r{example-team-on-org})
end
Expand Down
86 changes: 43 additions & 43 deletions spec/classes/grafana_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -279,28 +279,28 @@
}
end

expected = "# This file is managed by Puppet, any changes will be overwritten\n\n"\
"app_mode = production\n\n"\
"[section]\n"\
"boolean = false\n"\
"empty = \n"\
"number = 8080\n"\
expected = "# This file is managed by Puppet, any changes will be overwritten\n\n" \
"app_mode = production\n\n" \
"[section]\n" \
"boolean = false\n" \
"empty = \n" \
"number = 8080\n" \
"string = production\n"

it { is_expected.to contain_file('grafana.ini').with_content(expected) }

ldap_expected = "\n[[servers]]\n"\
"host = \"server1\"\n"\
"search_base_dns = [\"dc=domain1,dc=com\"]\n"\
"search_filter = \"(sAMAccountName=%s)\"\n"\
"use_ssl = true\n"\
"\n"\
"[servers.attributes]\n"\
"email = \"mail\"\n"\
"member_of = \"memberOf\"\n"\
"name = \"givenName\"\n"\
"surname = \"sn\"\n"\
"username = \"sAMAccountName\"\n"\
ldap_expected = "\n[[servers]]\n" \
"host = \"server1\"\n" \
"search_base_dns = [\"dc=domain1,dc=com\"]\n" \
"search_filter = \"(sAMAccountName=%s)\"\n" \
"use_ssl = true\n" \
"\n" \
"[servers.attributes]\n" \
"email = \"mail\"\n" \
"member_of = \"memberOf\"\n" \
"name = \"givenName\"\n" \
"surname = \"sn\"\n" \
"username = \"sAMAccountName\"\n" \
"\n"

it { is_expected.to contain_file('/etc/grafana/ldap.toml').with_content(ldap_expected) }
Expand Down Expand Up @@ -381,31 +381,31 @@
}
end

ldap_expected = "\n[[servers]]\n"\
"host = \"server1a server1b\"\n"\
"search_base_dns = [\"dc=domain1,dc=com\"]\n"\
"search_filter = \"(sAMAccountName=%s)\"\n"\
"use_ssl = true\n"\
"\n"\
"[servers.attributes]\n"\
"email = \"mail\"\n"\
"member_of = \"memberOf\"\n"\
"name = \"givenName\"\n"\
"surname = \"sn\"\n"\
"username = \"sAMAccountName\"\n"\
"\n"\
"\n[[servers]]\n"\
"host = \"server2a server2b\"\n"\
"search_base_dns = [\"dc=domain2,dc=com\"]\n"\
"search_filter = \"(sAMAccountName=%s)\"\n"\
"use_ssl = true\n"\
"\n"\
"[servers.attributes]\n"\
"email = \"mail\"\n"\
"member_of = \"memberOf\"\n"\
"name = \"givenName\"\n"\
"surname = \"sn\"\n"\
"username = \"sAMAccountName\"\n"\
ldap_expected = "\n[[servers]]\n" \
"host = \"server1a server1b\"\n" \
"search_base_dns = [\"dc=domain1,dc=com\"]\n" \
"search_filter = \"(sAMAccountName=%s)\"\n" \
"use_ssl = true\n" \
"\n" \
"[servers.attributes]\n" \
"email = \"mail\"\n" \
"member_of = \"memberOf\"\n" \
"name = \"givenName\"\n" \
"surname = \"sn\"\n" \
"username = \"sAMAccountName\"\n" \
"\n" \
"\n[[servers]]\n" \
"host = \"server2a server2b\"\n" \
"search_base_dns = [\"dc=domain2,dc=com\"]\n" \
"search_filter = \"(sAMAccountName=%s)\"\n" \
"use_ssl = true\n" \
"\n" \
"[servers.attributes]\n" \
"email = \"mail\"\n" \
"member_of = \"memberOf\"\n" \
"name = \"givenName\"\n" \
"surname = \"sn\"\n" \
"username = \"sAMAccountName\"\n" \
"\n"

it { is_expected.to contain_file('/etc/grafana/ldap.toml').with_content(ldap_expected) }
Expand Down
1 change: 1 addition & 0 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@
add_custom_fact name.to_sym, value
end
end
Dir['./spec/support/spec/**/*.rb'].sort.each { |f| require f }

0 comments on commit e88c59d

Please sign in to comment.