File: test_common_flags.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 (31 lines) | stat: -rw-r--r-- 763 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
27
28
29
30
31
require "helpers/integration_test_helper"

class TestCommonFlags < FogIntegrationTest
  def setup
    @client = Fog::Google::SQL.new
  end

  def test_list
    resp = @client.list_flags

    assert_operator(resp.items.size, :>, 0,
                    "resource descriptor count should be positive")

    _sanity_check_flag(resp.items.first)
  end

  def test_all
    resp = @client.flags.all

    assert_operator(resp.size, :>, 0,
                    "resource descriptor count should be positive")

    _sanity_check_flag(resp.first)
  end

  def _sanity_check_flag(flag)
    assert_equal(flag.kind, "sql#flag")
    refute(flag.name.nil?, "flag name should not be empty")
    refute_empty(flag.applies_to, "flag should apply to some database version")
  end
end