Showing with 76 additions and 52 deletions.
  1. +1 −1 .msync.yml
  2. +2 −0 .rubocop.yml
  3. +13 −0 .rubocop_todo.yml
  4. +8 −0 CHANGELOG.md
  5. +1 −1 Gemfile
  6. +1 −1 REFERENCE.md
  7. +1 −1 data/family/Debian.yaml
  8. +1 −1 manifests/init.pp
  9. +1 −1 metadata.json
  10. +3 −3 spec/acceptance/grafana_team_spec.rb
  11. +43 −43 spec/classes/grafana_spec.rb
  12. +1 −0 spec/spec_helper.rb
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'
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ All notable changes to this project will be documented in this file.
Each new release typically also includes the latest modulesync defaults.
These should not affect the functionality of the module.

## [v13.0.1](https://github.com/voxpupuli/puppet-grafana/tree/v13.0.1) (2023-09-15)

[Full Changelog](https://github.com/voxpupuli/puppet-grafana/compare/v13.0.0...v13.0.1)

**Fixed bugs:**

- Update Debian repo signing key [\#335](https://github.com/voxpupuli/puppet-grafana/pull/335) ([mouchymouchy](https://github.com/mouchymouchy))

## [v13.0.0](https://github.com/voxpupuli/puppet-grafana/tree/v13.0.0) (2023-06-22)

[Full Changelog](https://github.com/voxpupuli/puppet-grafana/compare/v12.0.0...v13.0.0)
Expand Down
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
2 changes: 1 addition & 1 deletion REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ Data type: `String[1]`

When using 'repo' install_method, the repo_key_id of the repo_gpg_key_url key on Debian based systems.

Default value: `'0E22EB88E39E12277A7760AE9E439B102CF3C0C6'`
Default value: `'B53AE77BADB630A683046005963FA27710458545'`

##### <a name="-grafana--repo_release"></a>`repo_release`

Expand Down
2 changes: 1 addition & 1 deletion data/family/Debian.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
grafana::install_method: 'repo'
grafana::repo_url: 'https://apt.grafana.com'
grafana::repo_key_id: '0E22EB88E39E12277A7760AE9E439B102CF3C0C6'
grafana::repo_key_id: 'B53AE77BADB630A683046005963FA27710458545'
grafana::sysconfig_location: '/etc/default/grafana-server'
2 changes: 1 addition & 1 deletion manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@
String $install_dir = '/usr/share/grafana',
Optional[String] $package_source = undef,
Enum['stable', 'beta', 'custom'] $repo_name = 'stable',
String[1] $repo_key_id = '0E22EB88E39E12277A7760AE9E439B102CF3C0C6',
String[1] $repo_key_id = 'B53AE77BADB630A683046005963FA27710458545',
Optional[String[1]] $repo_release = undef,
String $rpm_iteration = '1',
String $version = 'installed',
Expand Down
2 changes: 1 addition & 1 deletion metadata.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "puppet-grafana",
"version": "13.0.0",
"version": "13.0.1",
"author": "Vox Pupuli",
"summary": "This module provides Grafana, a dashboard and graph editor for Graphite and InfluxDB.",
"license": "Apache-2.0",
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 }