|
17 | 17 | authorized_network = attribute('authorized_network') |
18 | 18 |
|
19 | 19 | describe google_sql_database_instances(project: project_id).where(instance_name: /#{basename}/) do |
20 | | - its(:count) { should eq 5 } |
| 20 | + its(:count) { should eq 4 } |
21 | 21 | end |
22 | 22 |
|
23 | 23 | describe google_sql_database_instance(project: project_id, database: basename) do |
24 | 24 | let(:expected_settings) { |
25 | 25 | { |
26 | 26 | activation_policy: "ALWAYS", |
| 27 | + availability_type: "REGIONAL", |
27 | 28 | data_disk_size_gb: 10, |
28 | 29 | data_disk_type: "PD_SSD", |
29 | 30 | kind: "sql#settings", |
|
57 | 58 | it { expect(user_labels).to include(foo: "bar") } |
58 | 59 | end |
59 | 60 |
|
60 | | -describe google_sql_database_instance(project: project_id, database: "#{basename}-failover-test") do |
61 | | - let(:expected_settings) { |
62 | | - { |
63 | | - activation_policy: "ALWAYS", |
64 | | - data_disk_size_gb: 10, |
65 | | - data_disk_type: "PD_SSD", |
66 | | - kind: "sql#settings", |
67 | | - pricing_plan: "PER_USE", |
68 | | - replication_type: "SYNCHRONOUS", |
69 | | - storage_auto_resize: true, |
70 | | - storage_auto_resize_limit: 0, |
71 | | - tier: "db-n1-standard-1", |
72 | | - } |
73 | | - } |
74 | | - let(:settings) { subject.settings.item } |
75 | | - let(:ip_configuration) { settings[:ip_configuration] } |
76 | | - let(:database_flags) { settings[:database_flags] } |
77 | | - let(:location_preference) { settings[:location_preference] } |
78 | | - let(:maintenance_window) { settings[:maintenance_window] } |
79 | | - let(:user_labels) { settings[:user_labels] } |
80 | | - |
81 | | - its(:backend_type) { should eq 'SECOND_GEN' } |
82 | | - its(:database_version) { should eq 'MYSQL_5_7' } |
83 | | - its(:state) { should eq 'RUNNABLE' } |
84 | | - its(:region) { should eq 'us-central1' } |
85 | | - its(:gce_zone) { should eq 'us-central1-a' } |
86 | | - |
87 | | - it { expect(settings).to include(expected_settings) } |
88 | | - it { expect(ip_configuration).to include(authorized_networks: [{kind: 'sql#aclEntry', name: "#{project_id}-cidr", value: authorized_network}], ipv4_enabled: true, require_ssl: false) } |
89 | | - it { expect(database_flags).to include(name: "long_query_time", value: "1") } |
90 | | - it { expect(location_preference).to include(kind: "sql#locationPreference", zone: "us-central1-a") } |
91 | | - it { expect(maintenance_window).to include(kind: "sql#maintenanceWindow", day: 3, hour: 20, update_track: "canary") } |
92 | | - it { expect(user_labels).to include(baz: "boo") } |
93 | | -end |
94 | | - |
95 | 61 | %i[a b c].each_with_index do |zone, index| |
96 | 62 | name = "#{basename}-replica-test#{index}" |
97 | 63 | describe google_sql_database_instance(project: project_id, database: name) do |
|
0 commit comments