-
-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
support purging for all types of resources
- Loading branch information
Showing
25 changed files
with
326 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# frozen_string_literal: true | ||
|
||
require 'spec_helper' | ||
|
||
describe 'proxy_cluster' do | ||
let :title do | ||
'some-title' | ||
end | ||
|
||
let(:params) do | ||
{ | ||
ensure: 'present', | ||
name: 'some-name', | ||
hostname: 'some-host', | ||
port: 1234, | ||
} | ||
end | ||
|
||
context 'with ensure => present' do | ||
it { is_expected.to be_valid_type } | ||
it { is_expected.to be_valid_type.with_provider(:proxysql) } | ||
it { is_expected.to be_valid_type.with_parameters(%w[name load_to_runtime save_to_disk]) } | ||
end | ||
|
||
context 'with ensure => absent' do | ||
let(:params) do | ||
super().merge({ 'ensure' => 'absent' }) | ||
end | ||
|
||
it { is_expected.to be_valid_type } | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# frozen_string_literal: true | ||
|
||
require 'spec_helper' | ||
|
||
describe 'proxy_global_variable' do | ||
let :title do | ||
'some-variable' | ||
end | ||
|
||
let(:params) do | ||
{ | ||
value: 'some-value', | ||
} | ||
end | ||
|
||
it { is_expected.to be_valid_type } | ||
it { is_expected.to be_valid_type.with_provider(:proxysql) } | ||
it { is_expected.to be_valid_type.with_parameters(%w[name load_to_runtime save_to_disk]) } | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
spec/types/proxy_mysql_group_replication_hostgroup_spec.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# frozen_string_literal: true | ||
|
||
require 'spec_helper' | ||
|
||
describe 'proxy_mysql_group_replication_hostgroup' do | ||
let :title do | ||
'some-title' | ||
end | ||
|
||
let(:params) do | ||
{ | ||
ensure: 'present', | ||
name: '10-20-30-40', | ||
writer_hostgroup: 10, | ||
backup_writer_hostgroup: 20, | ||
reader_hostgroup: 30, | ||
offline_hostgroup: 40 | ||
} | ||
end | ||
|
||
context 'with ensure => present' do | ||
it { is_expected.to be_valid_type } | ||
it { is_expected.to be_valid_type.with_provider(:proxysql) } | ||
it { is_expected.to be_valid_type.with_parameters(%w[name load_to_runtime save_to_disk]) } | ||
end | ||
|
||
context 'with ensure => absent' do | ||
let(:params) do | ||
super().merge({ 'ensure' => 'absent' }) | ||
end | ||
|
||
it { is_expected.to be_valid_type } | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# frozen_string_literal: true | ||
|
||
require 'spec_helper' | ||
|
||
describe 'proxy_mysql_query_rule' do | ||
let :title do | ||
'some-title' | ||
end | ||
|
||
let(:params) do | ||
{ | ||
ensure: 'present', | ||
name: 'mysql_query_rule-10', | ||
rule_id: 10, | ||
} | ||
end | ||
|
||
context 'with ensure => present' do | ||
it { is_expected.to be_valid_type } | ||
it { is_expected.to be_valid_type.with_provider(:proxysql) } | ||
it { is_expected.to be_valid_type.with_parameters(%w[name load_to_runtime save_to_disk]) } | ||
end | ||
|
||
context 'with ensure => absent' do | ||
let(:params) do | ||
super().merge({ 'ensure' => 'absent' }) | ||
end | ||
|
||
it { is_expected.to be_valid_type } | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# frozen_string_literal: true | ||
|
||
require 'spec_helper' | ||
|
||
describe 'proxy_mysql_replication_hostgroup' do | ||
let :title do | ||
'some-title' | ||
end | ||
|
||
let(:params) do | ||
{ | ||
ensure: 'present', | ||
name: '10-30', | ||
writer_hostgroup: 10, | ||
reader_hostgroup: 30 | ||
} | ||
end | ||
|
||
context 'with ensure => present' do | ||
it { is_expected.to be_valid_type } | ||
it { is_expected.to be_valid_type.with_provider(:proxysql) } | ||
it { is_expected.to be_valid_type.with_parameters(%w[name load_to_runtime save_to_disk]) } | ||
end | ||
|
||
context 'with ensure => absent' do | ||
let(:params) do | ||
super().merge({ 'ensure' => 'absent' }) | ||
end | ||
|
||
it { is_expected.to be_valid_type } | ||
end | ||
end |
Oops, something went wrong.