File: test_common_tiers.rb

package info (click to toggle)
ruby-fog-google 1.19.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,568 kB
  • sloc: ruby: 16,775; makefile: 3
file content (26 lines) | stat: -rw-r--r-- 744 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
require "helpers/integration_test_helper"

class TestCommonTiers < FogIntegrationTest
  def setup
    @subject = Fog::Google[:sql].tiers
  end

  def test_all
    tiers = @subject.all

    assert_operator(tiers.size, :>, 0,
                    "tier count should be positive")
    _sanity_check_tier(tiers.first)
  end

  def _sanity_check_tier(tier)
    assert_equal(tier.kind, "sql#tier")
    refute(tier.tier.nil?, "tier name should not be empty")
    assert_operator(tier.disk_quota, :>, 0,
                    "tier disk quota should be positive")
    assert_operator(tier.ram, :>, 0,
                    "tier ram should be positive")
    assert_operator(tier.region.size, :>, 0,
                    "tier should have regions")
  end
end