serverspec 2.18.0 → 2.19.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/serverspec/helper/type.rb +8 -7
- data/lib/serverspec/type/mysql_config.rb +10 -0
- data/lib/serverspec/version.rb +1 -1
- data/spec/type/base/mysql_config_spec.rb +13 -0
- metadata +5 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 119bf22793a3097fa86e5d6725b2c065dd75e446
|
4
|
+
data.tar.gz: e086d4e937daf14d7c05c3935e09d211aac81e65
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dc074c9c3dbc4bd3b4eef0fd97319cadd289f7f56458df0dd01c562bfc12e3dda70abcfdf455246ebb089a3dd1661930b1b3ecf082835b5b548225efad579d7e
|
7
|
+
data.tar.gz: 17e394fcc4803504ccb7c3456244db044e16cb3b56db29a6c63dafe9a140eb4edec18d5372ed4f747bdfd6caf2580020696b87adfbdd721be2f809cb3ec01eae
|
@@ -2,13 +2,14 @@ module Serverspec
|
|
2
2
|
module Helper
|
3
3
|
module Type
|
4
4
|
types = %w(
|
5
|
-
base bridge bond cgroup command cron default_gateway file fstab
|
6
|
-
iis_website iis_app_pool interface ipfilter ipnat
|
7
|
-
ip6tables kernel_module linux_kernel_parameter lxc
|
8
|
-
package php_config port ppa process
|
9
|
-
selinux_module service user yumrepo
|
10
|
-
windows_hot_fix windows_registry_key
|
11
|
-
docker_base docker_image
|
5
|
+
base bridge bond cgroup command cron default_gateway file fstab
|
6
|
+
group host iis_website iis_app_pool interface ipfilter ipnat
|
7
|
+
iptables ip6tables kernel_module linux_kernel_parameter lxc
|
8
|
+
mail_alias mysql_config package php_config port ppa process
|
9
|
+
routing_table selinux selinux_module service user yumrepo
|
10
|
+
windows_feature windows_hot_fix windows_registry_key
|
11
|
+
windows_scheduled_task zfs docker_base docker_image
|
12
|
+
docker_container x509_certificate x509_private_key
|
12
13
|
)
|
13
14
|
|
14
15
|
types.each {|type| require "serverspec/type/#{type}" }
|
@@ -0,0 +1,10 @@
|
|
1
|
+
module Serverspec::Type
|
2
|
+
class MysqlConfig < Base
|
3
|
+
def value
|
4
|
+
ret = @runner.run_command("mysqld --verbose --help 2> /dev/null | grep '^#{@name}'")
|
5
|
+
val = ret.stdout.match(/#{@name}\s+(.+)$/)[1]
|
6
|
+
val = val.to_i if val.match(/^\d+$/)
|
7
|
+
val
|
8
|
+
end
|
9
|
+
end
|
10
|
+
end
|
data/lib/serverspec/version.rb
CHANGED
@@ -0,0 +1,13 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
set :os, :family => 'base'
|
4
|
+
|
5
|
+
describe mysql_config('innodb-buffer-pool-size') do
|
6
|
+
let(:stdout) { 'innodb-buffer-pool-size 134217728' }
|
7
|
+
its(:value) { should eq 134217728 }
|
8
|
+
end
|
9
|
+
|
10
|
+
describe mysql_config('socket') do
|
11
|
+
let(:stdout) { 'socket /tmp/mysql.sock' }
|
12
|
+
its(:value) { should eq '/tmp/mysql.sock' }
|
13
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: serverspec
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.19.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gosuke Miyashita
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-06-
|
11
|
+
date: 2015-06-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|
@@ -165,6 +165,7 @@ files:
|
|
165
165
|
- lib/serverspec/type/linux_kernel_parameter.rb
|
166
166
|
- lib/serverspec/type/lxc.rb
|
167
167
|
- lib/serverspec/type/mail_alias.rb
|
168
|
+
- lib/serverspec/type/mysql_config.rb
|
168
169
|
- lib/serverspec/type/package.rb
|
169
170
|
- lib/serverspec/type/php_config.rb
|
170
171
|
- lib/serverspec/type/port.rb
|
@@ -203,6 +204,7 @@ files:
|
|
203
204
|
- spec/type/base/group_spec.rb
|
204
205
|
- spec/type/base/host_spec.rb
|
205
206
|
- spec/type/base/mail_alias_spec.rb
|
207
|
+
- spec/type/base/mysql_config_spec.rb
|
206
208
|
- spec/type/base/package_spec.rb
|
207
209
|
- spec/type/base/php_config_spec.rb
|
208
210
|
- spec/type/base/port_spec.rb
|
@@ -343,6 +345,7 @@ test_files:
|
|
343
345
|
- spec/type/base/group_spec.rb
|
344
346
|
- spec/type/base/host_spec.rb
|
345
347
|
- spec/type/base/mail_alias_spec.rb
|
348
|
+
- spec/type/base/mysql_config_spec.rb
|
346
349
|
- spec/type/base/package_spec.rb
|
347
350
|
- spec/type/base/php_config_spec.rb
|
348
351
|
- spec/type/base/port_spec.rb
|