Sha256: 607e009eb981330e620094b1bec7ea28c7d8840a7fd2fb7c2140ba79b795836e
Contents?: true
Size: 997 Bytes
Versions: 41
Compression:
Stored size: 997 Bytes
Contents
require "helpers/integration_test_helper" class TestMetricDescriptors < FogIntegrationTest def setup @client = Fog::Google::Monitoring.new end def test_list_and_get resp = @client.list_monitored_resource_descriptors assert_operator(resp.resource_descriptors.size, :>, 0, "resource descriptor count should be positive") @client.get_monitored_resource_descriptor( resp.resource_descriptors.first.type ) end def test_all resp = @client.monitored_resource_descriptors.all assert_operator(resp.size, :>, 0, "resource descriptor count should be positive") end def test_get resource = "global" descriptor = @client.monitored_resource_descriptors.get(resource) assert_equal( descriptor.name, "projects/#{@client.project}/monitoredResourceDescriptors/#{resource}" ) assert_equal(descriptor.labels.size, 1) assert_equal(descriptor.labels.first[:key], "project_id") end end
Version data entries
41 entries across 41 versions & 2 rubygems