hawkular-client 2.6.0 → 2.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES.rdoc +5 -2
- data/lib/hawkular/hawkular_client.rb +1 -1
- data/lib/hawkular/inventory/inventory_api.rb +2 -1
- data/lib/hawkular/metrics/metric_api.rb +4 -1
- data/lib/hawkular/operations/operations_api.rb +7 -4
- data/lib/hawkular/version.rb +1 -1
- data/spec/integration/inventory_spec.rb +516 -466
- data/spec/integration/metric_spec.rb +612 -561
- data/spec/integration/operations_spec.rb +425 -504
- data/spec/spec_helper.rb +73 -19
- data/spec/vcr_cassettes/Inventory/{Connection → NonSecure/Connection/Templates}/Should_err_on_bad_credentials.yml +6 -4
- data/spec/vcr_cassettes/Inventory/{Tenants → NonSecure/Tenants/Templates}/Should_Get_Tenant_For_Explicit_Credentials.yml +13 -9
- data/spec/vcr_cassettes/Inventory/{Tenants → NonSecure/Tenants/Templates}/Should_Get_Tenant_For_Implicit_Credentials.yml +13 -9
- data/spec/vcr_cassettes/Inventory/{inventory_0_17/Templates → NonSecure/inventory_0_17}/Client_should_listen_on_various_inventory_events.json +5 -5
- data/spec/vcr_cassettes/Inventory/{inventory_0_17 → NonSecure/inventory_0_17}/Templates/Client_should_listen_on_various_inventory_events.yml +21 -13
- data/spec/vcr_cassettes/Inventory/{inventory_0_17 → NonSecure/inventory_0_17/Templates}/Helpers/create_url.yml +12 -10
- data/spec/vcr_cassettes/Inventory/{inventory_0_17 → NonSecure/inventory_0_17}/Templates/Helpers/generate_some_events_for_websocket.yml +51 -37
- data/spec/vcr_cassettes/Inventory/{inventory_0_17 → NonSecure/inventory_0_17/Templates}/Helpers/get_feeds.yml +11 -9
- data/spec/vcr_cassettes/Inventory/{inventory_0_17 → NonSecure/inventory_0_17}/Templates/Should_List_datasources_with_no_props.yml +11 -7
- data/spec/vcr_cassettes/Inventory/{inventory_0_17 → NonSecure/inventory_0_17}/Templates/Should_create_a_feed.yml +6 -4
- data/spec/vcr_cassettes/Inventory/{inventory_0_17 → NonSecure/inventory_0_17}/Templates/Should_create_a_feed_again.yml +16 -10
- data/spec/vcr_cassettes/Inventory/NonSecure/inventory_0_17/Templates/Should_create_a_nested_resource_and_metric_on_it.yml +664 -0
- data/spec/vcr_cassettes/Inventory/{inventory_0_17 → NonSecure/inventory_0_17}/Templates/Should_create_a_resource.yml +31 -19
- data/spec/vcr_cassettes/Inventory/{inventory_0_17 → NonSecure/inventory_0_17}/Templates/Should_create_a_resource_with_metric.yml +77 -49
- data/spec/vcr_cassettes/Inventory/{inventory_0_17 → NonSecure/inventory_0_17}/Templates/Should_create_a_resourcetype.yml +16 -10
- data/spec/vcr_cassettes/Inventory/{inventory_0_17 → NonSecure/inventory_0_17}/Templates/Should_create_and_delete_feed.yml +19 -13
- data/spec/vcr_cassettes/Inventory/NonSecure/inventory_0_17/Templates/Should_create_and_get_a_resource.yml +420 -0
- data/spec/vcr_cassettes/Inventory/NonSecure/inventory_0_17/Templates/Should_get_resource_with_its_configurations.yml +132 -0
- data/spec/vcr_cassettes/Inventory/{inventory_0_17 → NonSecure/inventory_0_17}/Templates/Should_have_the_same_requested_metric_type_id.yml +8 -8
- data/spec/vcr_cassettes/Inventory/{inventory_0_17 → NonSecure/inventory_0_17}/Templates/Should_list_URLs.yml +29 -7
- data/spec/vcr_cassettes/Inventory/{inventory_0_17 → NonSecure/inventory_0_17}/Templates/Should_list_WildFlys.yml +10 -8
- data/spec/vcr_cassettes/Inventory/{inventory_0_17 → NonSecure/inventory_0_17}/Templates/Should_list_WildFlys_with_props.yml +24 -17
- data/spec/vcr_cassettes/Inventory/{inventory_0_17 → NonSecure/inventory_0_17}/Templates/Should_list_all_the_resource_types.yml +6 -4
- data/spec/vcr_cassettes/Inventory/{inventory_0_17 → NonSecure/inventory_0_17}/Templates/Should_list_children_of_WildFly.yml +31 -13
- data/spec/vcr_cassettes/Inventory/{inventory_0_17 → NonSecure/inventory_0_17}/Templates/Should_list_children_of_nested_resource.yml +16 -10
- data/spec/vcr_cassettes/Inventory/{inventory_0_17 → NonSecure/inventory_0_17}/Templates/Should_list_feeds.yml +9 -7
- data/spec/vcr_cassettes/Inventory/{inventory_0_17 → NonSecure/inventory_0_17}/Templates/Should_list_heap_metrics_for_WildFlys.yml +196 -188
- data/spec/vcr_cassettes/Inventory/{inventory_0_17 → NonSecure/inventory_0_17}/Templates/Should_list_metrics_for_WildFlys.yml +72 -68
- data/spec/vcr_cassettes/Inventory/{inventory_0_17 → NonSecure/inventory_0_17}/Templates/Should_list_metrics_of_given_metric_type.yml +12 -44
- data/spec/vcr_cassettes/Inventory/{inventory_0_17 → NonSecure/inventory_0_17}/Templates/Should_list_metrics_of_given_resource_type.yml +63 -61
- data/spec/vcr_cassettes/Inventory/{inventory_0_17 → NonSecure/inventory_0_17}/Templates/Should_list_operation_definitions_of_given_resource.yml +220 -156
- data/spec/vcr_cassettes/Inventory/{inventory_0_17 → NonSecure/inventory_0_17}/Templates/Should_list_operation_definitions_of_given_resource_type.yml +200 -140
- data/spec/vcr_cassettes/Inventory/{inventory_0_17 → NonSecure/inventory_0_17}/Templates/Should_list_recursive_children_of_WildFly.yml +30 -12
- data/spec/vcr_cassettes/Inventory/{inventory_0_17 → NonSecure/inventory_0_17}/Templates/Should_list_relationships_of_WildFly.yml +129 -113
- data/spec/vcr_cassettes/Inventory/{inventory_0_17 → NonSecure/inventory_0_17}/Templates/Should_list_resources_for_feed.yml +12 -10
- data/spec/vcr_cassettes/Inventory/{inventory_0_17 → NonSecure/inventory_0_17}/Templates/Should_list_types_with_bad_feed.yml +6 -4
- data/spec/vcr_cassettes/Inventory/{inventory_0_17 → NonSecure/inventory_0_17}/Templates/Should_list_types_with_feed.yml +7 -5
- data/spec/vcr_cassettes/Inventory/{inventory_0_17 → NonSecure/inventory_0_17}/Templates/Should_not_find_an_unknown_resource.yml +6 -4
- data/spec/vcr_cassettes/Inventory/{inventory_0_17 → NonSecure/inventory_0_17}/Templates/Should_return_config_data_of_given_nested_resource.yml +6 -4
- data/spec/vcr_cassettes/Inventory/{inventory_0_17 → NonSecure/inventory_0_17}/Templates/Should_return_config_data_of_given_resource.yml +15 -10
- data/spec/vcr_cassettes/Inventory/{inventory_0_17 → NonSecure/inventory_0_17}/Templates/Should_return_the_version.yml +8 -6
- data/spec/vcr_cassettes/Inventory/Secure/Connection/Templates/Should_err_on_bad_credentials.yml +44 -0
- data/spec/vcr_cassettes/Inventory/Secure/Tenants/Templates/Should_Get_Tenant_For_Explicit_Credentials.yml +101 -0
- data/spec/vcr_cassettes/Inventory/Secure/Tenants/Templates/Should_Get_Tenant_For_Implicit_Credentials.yml +101 -0
- data/spec/vcr_cassettes/Inventory/Secure/inventory_0_17/Client_should_listen_on_various_inventory_events.json +47 -0
- data/spec/vcr_cassettes/Inventory/Secure/inventory_0_17/Templates/Client_should_listen_on_various_inventory_events.yml +207 -0
- data/spec/vcr_cassettes/Inventory/Secure/inventory_0_17/Templates/Helpers/create_url.yml +52 -0
- data/spec/vcr_cassettes/Inventory/Secure/inventory_0_17/Templates/Helpers/generate_some_events_for_websocket.yml +411 -0
- data/spec/vcr_cassettes/Inventory/{inventory_0_17/Templates/Should_list_feeds_when_using_SSL_without_certificate.yml → Secure/inventory_0_17/Templates/Helpers/get_feeds.yml} +13 -11
- data/spec/vcr_cassettes/Inventory/Secure/inventory_0_17/Templates/Should_List_datasources_with_no_props.yml +133 -0
- data/spec/vcr_cassettes/Inventory/Secure/inventory_0_17/Templates/Should_create_a_feed.yml +59 -0
- data/spec/vcr_cassettes/Inventory/Secure/inventory_0_17/Templates/Should_create_a_feed_again.yml +181 -0
- data/spec/vcr_cassettes/Inventory/{inventory_0_17 → Secure/inventory_0_17}/Templates/Should_create_a_nested_resource_and_metric_on_it.yml +108 -150
- data/spec/vcr_cassettes/Inventory/{inventory_0_17/Templates/Should_create_and_get_a_resource.yml → Secure/inventory_0_17/Templates/Should_create_a_resource.yml} +45 -87
- data/spec/vcr_cassettes/Inventory/Secure/inventory_0_17/Templates/Should_create_a_resource_with_metric.yml +846 -0
- data/spec/vcr_cassettes/Inventory/Secure/inventory_0_17/Templates/Should_create_a_resourcetype.yml +169 -0
- data/spec/vcr_cassettes/Inventory/Secure/inventory_0_17/Templates/Should_create_and_delete_feed.yml +166 -0
- data/spec/vcr_cassettes/Inventory/Secure/inventory_0_17/Templates/Should_create_and_get_a_resource.yml +420 -0
- data/spec/vcr_cassettes/Inventory/Secure/inventory_0_17/Templates/Should_get_resource_with_its_configurations.yml +132 -0
- data/spec/vcr_cassettes/Inventory/Secure/inventory_0_17/Templates/Should_have_the_same_requested_metric_type_id.yml +73 -0
- data/spec/vcr_cassettes/Inventory/Secure/inventory_0_17/Templates/Should_list_URLs.yml +90 -0
- data/spec/vcr_cassettes/Inventory/Secure/inventory_0_17/Templates/Should_list_WildFlys.yml +70 -0
- data/spec/vcr_cassettes/Inventory/Secure/inventory_0_17/Templates/Should_list_WildFlys_with_props.yml +138 -0
- data/spec/vcr_cassettes/Inventory/Secure/inventory_0_17/Templates/Should_list_all_the_resource_types.yml +59 -0
- data/spec/vcr_cassettes/Inventory/Secure/inventory_0_17/Templates/Should_list_children_of_WildFly.yml +333 -0
- data/spec/vcr_cassettes/Inventory/Secure/inventory_0_17/Templates/Should_list_children_of_nested_resource.yml +180 -0
- data/spec/vcr_cassettes/{Operation/Helpers/get_feed.yml → Inventory/Secure/inventory_0_17/Templates/Should_list_feeds.yml} +13 -11
- data/spec/vcr_cassettes/Inventory/Secure/inventory_0_17/Templates/Should_list_heap_metrics_for_WildFlys.yml +943 -0
- data/spec/vcr_cassettes/Inventory/Secure/inventory_0_17/Templates/Should_list_metrics_for_WildFlys.yml +361 -0
- data/spec/vcr_cassettes/Inventory/Secure/inventory_0_17/Templates/Should_list_metrics_of_given_metric_type.yml +90 -0
- data/spec/vcr_cassettes/Inventory/Secure/inventory_0_17/Templates/Should_list_metrics_of_given_resource_type.yml +294 -0
- data/spec/vcr_cassettes/Inventory/Secure/inventory_0_17/Templates/Should_list_operation_definitions_of_given_resource.yml +871 -0
- data/spec/vcr_cassettes/Inventory/Secure/inventory_0_17/Templates/Should_list_operation_definitions_of_given_resource_type.yml +740 -0
- data/spec/vcr_cassettes/Inventory/Secure/inventory_0_17/Templates/Should_list_recursive_children_of_WildFly.yml +1117 -0
- data/spec/vcr_cassettes/Inventory/Secure/inventory_0_17/Templates/Should_list_relationships_of_WildFly.yml +393 -0
- data/spec/vcr_cassettes/Inventory/Secure/inventory_0_17/Templates/Should_list_resources_for_feed.yml +84 -0
- data/spec/vcr_cassettes/Inventory/Secure/inventory_0_17/Templates/Should_list_types_with_bad_feed.yml +55 -0
- data/spec/vcr_cassettes/Inventory/Secure/inventory_0_17/Templates/Should_list_types_with_feed.yml +166 -0
- data/spec/vcr_cassettes/Inventory/Secure/inventory_0_17/Templates/Should_not_find_an_unknown_resource.yml +59 -0
- data/spec/vcr_cassettes/Inventory/Secure/inventory_0_17/Templates/Should_return_config_data_of_given_nested_resource.yml +66 -0
- data/spec/vcr_cassettes/Inventory/Secure/inventory_0_17/Templates/Should_return_config_data_of_given_resource.yml +71 -0
- data/spec/vcr_cassettes/Inventory/Secure/inventory_0_17/Templates/Should_return_the_version.yml +50 -0
- data/spec/vcr_cassettes/Inventory/Templates/Should_list_feeds_when_using_SSL_without_certificate.yml +114 -0
- data/spec/vcr_cassettes/{Metric_ID_with_special_characters → Metrics/NonSecure/ID_with_special_characters/Templates}/Get_metric_definition_by_id.yml +10 -8
- data/spec/vcr_cassettes/{Metric_ID_with_special_characters → Metrics/NonSecure/ID_with_special_characters/Templates}/Retrieve_metric_rate_points.yml +18 -14
- data/spec/vcr_cassettes/{Metric_ID_with_special_characters → Metrics/NonSecure/ID_with_special_characters/Templates}/Should_create_Availability_definition.yml +18 -14
- data/spec/vcr_cassettes/{Metric_ID_with_special_characters → Metrics/NonSecure/ID_with_special_characters/Templates}/Should_create_Counter_definition.yml +18 -14
- data/spec/vcr_cassettes/{Metric_ID_with_special_characters → Metrics/NonSecure/ID_with_special_characters/Templates}/Should_create_gauge_definition.yml +18 -14
- data/spec/vcr_cassettes/{Metric_ID_with_special_characters → Metrics/NonSecure/ID_with_special_characters/Templates}/Should_push_metric_data_to_existing_gauge.yml +9 -7
- data/spec/vcr_cassettes/{Metric_ID_with_special_characters → Metrics/NonSecure/ID_with_special_characters/Templates}/Should_update_tags_for_Availability_definition.yml +28 -22
- data/spec/vcr_cassettes/{Metric_ID_with_special_characters → Metrics/NonSecure/ID_with_special_characters/Templates}/Should_update_tags_for_gauge_definition.yml +28 -22
- data/spec/vcr_cassettes/Metrics/{metrics_0_16_0 → NonSecure/metrics_0_16_0}/Templates/Availability_metrics/Should_create_Availability_definition_using_MetricDefinition_parameter.yml +12 -8
- data/spec/vcr_cassettes/Metrics/{metrics_0_16_0 → NonSecure/metrics_0_16_0}/Templates/Availability_metrics/Should_create_and_return_Availability_using_Hash_parameter.yml +14 -10
- data/spec/vcr_cassettes/Metrics/{metrics_0_16_0 → NonSecure/metrics_0_16_0}/Templates/Availability_metrics/Should_group_contiguous_values.yml +10 -6
- data/spec/vcr_cassettes/Metrics/{metrics_0_16_0 → NonSecure/metrics_0_16_0}/Templates/Availability_metrics/Should_push_metric_data_to_non-existing_Availability.yml +19 -13
- data/spec/vcr_cassettes/Metrics/{metrics_0_16_0 → NonSecure/metrics_0_16_0}/Templates/Availability_metrics/Should_update_tags_for_Availability_definition.yml +31 -21
- data/spec/vcr_cassettes/Metrics/{metrics_0_16_0 → NonSecure/metrics_0_16_0}/Templates/Counter_metrics/Should_create_and_return_counter_using_Hash_parameter.yml +14 -10
- data/spec/vcr_cassettes/Metrics/{metrics_0_16_0 → NonSecure/metrics_0_16_0}/Templates/Counter_metrics/Should_create_counter_definition_using_MetricDefinition_parameter.yml +12 -8
- data/spec/vcr_cassettes/Metrics/{metrics_0_16_0 → NonSecure/metrics_0_16_0}/Templates/Counter_metrics/Should_get_metrics_as_bucketed_results.yml +28 -18
- data/spec/vcr_cassettes/Metrics/{metrics_0_16_0 → NonSecure/metrics_0_16_0}/Templates/Counter_metrics/Should_get_metrics_with_limit_and_order.yml +38 -24
- data/spec/vcr_cassettes/Metrics/{metrics_0_16_0 → NonSecure/metrics_0_16_0}/Templates/Counter_metrics/Should_push_metric_data_to_existing_counter.yml +32 -20
- data/spec/vcr_cassettes/Metrics/{metrics_0_16_0 → NonSecure/metrics_0_16_0}/Templates/Counter_metrics/Should_push_metric_data_to_non-existing_counter.yml +19 -13
- data/spec/vcr_cassettes/Metrics/{metrics_0_16_0 → NonSecure/metrics_0_16_0}/Templates/Gauge_metrics/Should_create_gauge_definition_using_Hash.yml +14 -10
- data/spec/vcr_cassettes/Metrics/{metrics_0_16_0 → NonSecure/metrics_0_16_0}/Templates/Gauge_metrics/Should_create_gauge_definition_using_MetricDefinition.yml +12 -8
- data/spec/vcr_cassettes/Metrics/{metrics_0_16_0 → NonSecure/metrics_0_16_0}/Templates/Gauge_metrics/Should_push_metric_data_to_existing_gauge.yml +32 -20
- data/spec/vcr_cassettes/Metrics/{metrics_0_16_0 → NonSecure/metrics_0_16_0}/Templates/Gauge_metrics/Should_push_metric_data_to_non-existing_gauge.yml +19 -13
- data/spec/vcr_cassettes/Metrics/{metrics_0_16_0 → NonSecure/metrics_0_16_0}/Templates/Gauge_metrics/Should_return_periods.yml +10 -6
- data/spec/vcr_cassettes/Metrics/{metrics_0_16_0 → NonSecure/metrics_0_16_0}/Templates/Gauge_metrics/Should_update_tags_for_gauge_definition.yml +31 -21
- data/spec/vcr_cassettes/Metrics/{metrics_0_16_0 → NonSecure/metrics_0_16_0}/Templates/Mixed_metrics/Should_requests_raw_data_for_multiple_metrics.yml +48 -52
- data/spec/vcr_cassettes/Metrics/{metrics_0_16_0 → NonSecure/metrics_0_16_0}/Templates/Mixed_metrics/Should_send_mixed_metric_request.yml +39 -25
- data/spec/vcr_cassettes/Metrics/{metrics_0_16_0 → NonSecure/metrics_0_16_0}/Templates/Mixed_metrics/Should_send_mixed_metric_request_of_a_single_type.yml +36 -24
- data/spec/vcr_cassettes/Metrics/{metrics_0_16_0 → NonSecure/metrics_0_16_0}/Templates/No_Tenant/Should_fail.yml +6 -4
- data/spec/vcr_cassettes/Metrics/{metrics_0_16_0 → NonSecure/metrics_0_16_0}/Templates/Simple/Should_be_Cool.yml +2 -2
- data/spec/vcr_cassettes/Metrics/{metrics_0_16_0 → NonSecure/metrics_0_16_0}/Templates/Status/Should_return_the_version.yml +5 -3
- data/spec/vcr_cassettes/Metrics/NonSecure/metrics_0_16_0/Templates/Tenants/Should_create_and_return_tenant.yml +99 -0
- data/spec/vcr_cassettes/Metrics/{metrics_0_8_0 → NonSecure/metrics_0_8_0}/Templates/Availability_metrics/Should_create_Availability_definition_using_MetricDefinition_parameter.yml +0 -0
- data/spec/vcr_cassettes/Metrics/{metrics_0_8_0 → NonSecure/metrics_0_8_0}/Templates/Availability_metrics/Should_create_and_return_Availability_using_Hash_parameter.yml +3 -3
- data/spec/vcr_cassettes/Metrics/{metrics_0_8_0 → NonSecure/metrics_0_8_0}/Templates/Availability_metrics/Should_push_metric_data_to_non-existing_Availability.yml +0 -0
- data/spec/vcr_cassettes/Metrics/{metrics_0_8_0 → NonSecure/metrics_0_8_0}/Templates/Availability_metrics/Should_update_tags_for_Availability_definition.yml +0 -0
- data/spec/vcr_cassettes/Metrics/{metrics_0_8_0 → NonSecure/metrics_0_8_0}/Templates/Counter_metrics/Should_create_and_return_counter_using_Hash_parameter.yml +3 -3
- data/spec/vcr_cassettes/Metrics/{metrics_0_8_0 → NonSecure/metrics_0_8_0}/Templates/Counter_metrics/Should_create_counter_definition_using_MetricDefinition_parameter.yml +0 -0
- data/spec/vcr_cassettes/Metrics/{metrics_0_8_0 → NonSecure/metrics_0_8_0}/Templates/Counter_metrics/Should_get_metrics_as_bucketed_results.yml +0 -0
- data/spec/vcr_cassettes/Metrics/{metrics_0_8_0 → NonSecure/metrics_0_8_0}/Templates/Counter_metrics/Should_push_metric_data_to_existing_counter.yml +0 -0
- data/spec/vcr_cassettes/Metrics/{metrics_0_8_0 → NonSecure/metrics_0_8_0}/Templates/Counter_metrics/Should_push_metric_data_to_non-existing_counter.yml +0 -0
- data/spec/vcr_cassettes/Metrics/{metrics_0_8_0 → NonSecure/metrics_0_8_0}/Templates/Gauge_metrics/Should_create_gauge_definition_using_Hash.yml +3 -3
- data/spec/vcr_cassettes/Metrics/{metrics_0_8_0 → NonSecure/metrics_0_8_0}/Templates/Gauge_metrics/Should_create_gauge_definition_using_MetricDefinition.yml +0 -0
- data/spec/vcr_cassettes/Metrics/{metrics_0_8_0 → NonSecure/metrics_0_8_0}/Templates/Gauge_metrics/Should_push_metric_data_to_existing_gauge.yml +0 -0
- data/spec/vcr_cassettes/Metrics/{metrics_0_8_0 → NonSecure/metrics_0_8_0}/Templates/Gauge_metrics/Should_push_metric_data_to_non-existing_gauge.yml +0 -0
- data/spec/vcr_cassettes/Metrics/{metrics_0_8_0 → NonSecure/metrics_0_8_0}/Templates/Gauge_metrics/Should_return_periods.yml +0 -0
- data/spec/vcr_cassettes/Metrics/{metrics_0_8_0 → NonSecure/metrics_0_8_0}/Templates/Gauge_metrics/Should_update_tags_for_gauge_definition.yml +0 -0
- data/spec/vcr_cassettes/Metrics/{metrics_0_8_0 → NonSecure/metrics_0_8_0}/Templates/Mixed_metrics/Should_send_mixed_metric_request.yml +0 -0
- data/spec/vcr_cassettes/Metrics/{metrics_0_8_0 → NonSecure/metrics_0_8_0}/Templates/Mixed_metrics/Should_send_mixed_metric_request_of_a_single_type.yml +0 -0
- data/spec/vcr_cassettes/Metrics/{metrics_0_8_0 → NonSecure/metrics_0_8_0}/Templates/Simple/Should_be_Cool.yml +0 -0
- data/spec/vcr_cassettes/Metrics/{metrics_0_8_0 → NonSecure/metrics_0_8_0}/Templates/Status/Should_return_the_version.yml +0 -0
- data/spec/vcr_cassettes/Metrics/{metrics_0_8_0 → NonSecure/metrics_0_8_0}/Templates/Tenants/Should_create_and_return_tenant.yml +0 -0
- data/spec/vcr_cassettes/Metrics/{metrics_services → NonSecure/metrics_services}/Templates/Availability_metrics/Should_create_Availability_definition_using_MetricDefinition_parameter.yml +19 -15
- data/spec/vcr_cassettes/Metrics/{metrics_services → NonSecure/metrics_services}/Templates/Availability_metrics/Should_create_and_return_Availability_using_Hash_parameter.yml +21 -17
- data/spec/vcr_cassettes/Metrics/{metrics_services → NonSecure/metrics_services}/Templates/Availability_metrics/Should_group_contiguous_values.yml +17 -13
- data/spec/vcr_cassettes/Metrics/{metrics_services → NonSecure/metrics_services}/Templates/Availability_metrics/Should_push_metric_data_to_non-existing_Availability.yml +29 -23
- data/spec/vcr_cassettes/Metrics/{metrics_services → NonSecure/metrics_services}/Templates/Availability_metrics/Should_update_tags_for_Availability_definition.yml +47 -37
- data/spec/vcr_cassettes/Metrics/{metrics_services → NonSecure/metrics_services}/Templates/Counter_metrics/Should_create_and_return_counter_using_Hash_parameter.yml +21 -17
- data/spec/vcr_cassettes/Metrics/{metrics_services → NonSecure/metrics_services}/Templates/Counter_metrics/Should_create_counter_definition_using_MetricDefinition_parameter.yml +19 -15
- data/spec/vcr_cassettes/Metrics/{metrics_services → NonSecure/metrics_services}/Templates/Counter_metrics/Should_get_metrics_as_bucketed_results.yml +44 -34
- data/spec/vcr_cassettes/Metrics/{metrics_services → NonSecure/metrics_services}/Templates/Counter_metrics/Should_get_metrics_with_limit_and_order.yml +60 -46
- data/spec/vcr_cassettes/Metrics/{metrics_services → NonSecure/metrics_services}/Templates/Counter_metrics/Should_push_metric_data_to_existing_counter.yml +51 -39
- data/spec/vcr_cassettes/Metrics/{metrics_services → NonSecure/metrics_services}/Templates/Counter_metrics/Should_push_metric_data_to_non-existing_counter.yml +29 -23
- data/spec/vcr_cassettes/Metrics/{metrics_services → NonSecure/metrics_services}/Templates/Gauge_metrics/Should_create_gauge_definition_using_Hash.yml +21 -17
- data/spec/vcr_cassettes/Metrics/{metrics_services → NonSecure/metrics_services}/Templates/Gauge_metrics/Should_create_gauge_definition_using_MetricDefinition.yml +19 -15
- data/spec/vcr_cassettes/Metrics/{metrics_services → NonSecure/metrics_services}/Templates/Gauge_metrics/Should_push_metric_data_to_existing_gauge.yml +51 -39
- data/spec/vcr_cassettes/Metrics/{metrics_services → NonSecure/metrics_services}/Templates/Gauge_metrics/Should_push_metric_data_to_non-existing_gauge.yml +29 -23
- data/spec/vcr_cassettes/Metrics/{metrics_services → NonSecure/metrics_services}/Templates/Gauge_metrics/Should_return_periods.yml +17 -13
- data/spec/vcr_cassettes/Metrics/NonSecure/metrics_services/Templates/Gauge_metrics/Should_return_platform_memory.yml +50 -0
- data/spec/vcr_cassettes/Metrics/{metrics_services → NonSecure/metrics_services}/Templates/Gauge_metrics/Should_return_platform_memory_def.yml +12 -10
- data/spec/vcr_cassettes/Metrics/{metrics_services → NonSecure/metrics_services}/Templates/Gauge_metrics/Should_update_tags_for_gauge_definition.yml +47 -37
- data/spec/vcr_cassettes/Metrics/NonSecure/metrics_services/Templates/Mixed_metrics/Should_fetch_rate_stats_for_mixed_metric.yml +328 -0
- data/spec/vcr_cassettes/Metrics/{metrics_services → NonSecure/metrics_services}/Templates/Mixed_metrics/Should_fetch_stats_for_mixed_metric.yml +32 -32
- data/spec/vcr_cassettes/Metrics/{metrics_services → NonSecure/metrics_services}/Templates/Mixed_metrics/Should_requests_raw_data_for_multiple_metrics.yml +70 -74
- data/spec/vcr_cassettes/Metrics/{metrics_services → NonSecure/metrics_services}/Templates/Mixed_metrics/Should_send_mixed_metric_request.yml +61 -47
- data/spec/vcr_cassettes/Metrics/{metrics_services → NonSecure/metrics_services}/Templates/Mixed_metrics/Should_send_mixed_metric_request_of_a_single_type.yml +55 -43
- data/spec/vcr_cassettes/Metrics/{metrics_services → NonSecure/metrics_services}/Templates/No_Tenant/Should_fail.yml +9 -7
- data/spec/vcr_cassettes/Metrics/{metrics_services → NonSecure/metrics_services}/Templates/Simple/Should_be_Cool.yml +3 -3
- data/spec/vcr_cassettes/Metrics/{metrics_services → NonSecure/metrics_services}/Templates/Status/Should_return_the_version.yml +10 -8
- data/spec/vcr_cassettes/Metrics/NonSecure/metrics_services/Templates/Tenants/Should_create_and_return_tenant.yml +99 -0
- data/spec/vcr_cassettes/Metrics/Secure/ID_with_special_characters/Templates/Get_metric_definition_by_id.yml +51 -0
- data/spec/vcr_cassettes/Metrics/Secure/ID_with_special_characters/Templates/Retrieve_metric_rate_points.yml +92 -0
- data/spec/vcr_cassettes/Metrics/Secure/ID_with_special_characters/Templates/Should_create_Availability_definition.yml +101 -0
- data/spec/vcr_cassettes/Metrics/Secure/ID_with_special_characters/Templates/Should_create_Counter_definition.yml +101 -0
- data/spec/vcr_cassettes/Metrics/Secure/ID_with_special_characters/Templates/Should_create_gauge_definition.yml +101 -0
- data/spec/vcr_cassettes/Metrics/Secure/ID_with_special_characters/Templates/Should_push_metric_data_to_existing_gauge.yml +50 -0
- data/spec/vcr_cassettes/Metrics/Secure/ID_with_special_characters/Templates/Should_update_tags_for_Availability_definition.yml +146 -0
- data/spec/vcr_cassettes/Metrics/Secure/ID_with_special_characters/Templates/Should_update_tags_for_gauge_definition.yml +146 -0
- data/spec/vcr_cassettes/Metrics/Secure/metrics_0_16_0/Templates/Availability_metrics/Should_create_Availability_definition_using_MetricDefinition_parameter.yml +99 -0
- data/spec/vcr_cassettes/Metrics/Secure/metrics_0_16_0/Templates/Availability_metrics/Should_create_and_return_Availability_using_Hash_parameter.yml +99 -0
- data/spec/vcr_cassettes/Metrics/Secure/metrics_0_16_0/Templates/Availability_metrics/Should_group_contiguous_values.yml +97 -0
- data/spec/vcr_cassettes/Metrics/Secure/metrics_0_16_0/Templates/Availability_metrics/Should_push_metric_data_to_non-existing_Availability.yml +144 -0
- data/spec/vcr_cassettes/Metrics/Secure/metrics_0_16_0/Templates/Availability_metrics/Should_update_tags_for_Availability_definition.yml +240 -0
- data/spec/vcr_cassettes/Metrics/Secure/metrics_0_16_0/Templates/Counter_metrics/Should_create_and_return_counter_using_Hash_parameter.yml +99 -0
- data/spec/vcr_cassettes/Metrics/Secure/metrics_0_16_0/Templates/Counter_metrics/Should_create_counter_definition_using_MetricDefinition_parameter.yml +99 -0
- data/spec/vcr_cassettes/Metrics/Secure/metrics_0_16_0/Templates/Counter_metrics/Should_get_metrics_as_bucketed_results.yml +240 -0
- data/spec/vcr_cassettes/Metrics/Secure/metrics_0_16_0/Templates/Counter_metrics/Should_get_metrics_with_limit_and_order.yml +328 -0
- data/spec/vcr_cassettes/Metrics/Secure/metrics_0_16_0/Templates/Counter_metrics/Should_push_metric_data_to_existing_counter.yml +281 -0
- data/spec/vcr_cassettes/Metrics/Secure/metrics_0_16_0/Templates/Counter_metrics/Should_push_metric_data_to_non-existing_counter.yml +144 -0
- data/spec/vcr_cassettes/Metrics/Secure/metrics_0_16_0/Templates/Gauge_metrics/Should_create_gauge_definition_using_Hash.yml +99 -0
- data/spec/vcr_cassettes/Metrics/Secure/metrics_0_16_0/Templates/Gauge_metrics/Should_create_gauge_definition_using_MetricDefinition.yml +99 -0
- data/spec/vcr_cassettes/Metrics/Secure/metrics_0_16_0/Templates/Gauge_metrics/Should_push_metric_data_to_existing_gauge.yml +281 -0
- data/spec/vcr_cassettes/Metrics/Secure/metrics_0_16_0/Templates/Gauge_metrics/Should_push_metric_data_to_non-existing_gauge.yml +144 -0
- data/spec/vcr_cassettes/Metrics/Secure/metrics_0_16_0/Templates/Gauge_metrics/Should_return_periods.yml +97 -0
- data/spec/vcr_cassettes/Metrics/Secure/metrics_0_16_0/Templates/Gauge_metrics/Should_update_tags_for_gauge_definition.yml +240 -0
- data/spec/vcr_cassettes/Metrics/Secure/metrics_0_16_0/Templates/Mixed_metrics/Should_requests_raw_data_for_multiple_metrics.yml +326 -0
- data/spec/vcr_cassettes/Metrics/Secure/metrics_0_16_0/Templates/Mixed_metrics/Should_send_mixed_metric_request.yml +314 -0
- data/spec/vcr_cassettes/Metrics/Secure/metrics_0_16_0/Templates/Mixed_metrics/Should_send_mixed_metric_request_of_a_single_type.yml +285 -0
- data/spec/vcr_cassettes/Metrics/Secure/metrics_0_16_0/Templates/No_Tenant/Should_fail.yml +50 -0
- data/spec/vcr_cassettes/Metrics/Secure/metrics_0_16_0/Templates/Simple/Should_be_Cool.yml +48 -0
- data/spec/vcr_cassettes/Metrics/Secure/metrics_0_16_0/Templates/Status/Should_return_the_version.yml +44 -0
- data/spec/vcr_cassettes/Metrics/Secure/metrics_0_16_0/Templates/Tenants/Should_create_and_return_tenant.yml +99 -0
- data/spec/vcr_cassettes/Metrics/Secure/metrics_services/Templates/Availability_metrics/Should_create_Availability_definition_using_MetricDefinition_parameter.yml +99 -0
- data/spec/vcr_cassettes/Metrics/Secure/metrics_services/Templates/Availability_metrics/Should_create_and_return_Availability_using_Hash_parameter.yml +99 -0
- data/spec/vcr_cassettes/Metrics/Secure/metrics_services/Templates/Availability_metrics/Should_group_contiguous_values.yml +97 -0
- data/spec/vcr_cassettes/Metrics/Secure/metrics_services/Templates/Availability_metrics/Should_push_metric_data_to_non-existing_Availability.yml +144 -0
- data/spec/vcr_cassettes/Metrics/Secure/metrics_services/Templates/Availability_metrics/Should_update_tags_for_Availability_definition.yml +240 -0
- data/spec/vcr_cassettes/Metrics/Secure/metrics_services/Templates/Counter_metrics/Should_create_and_return_counter_using_Hash_parameter.yml +99 -0
- data/spec/vcr_cassettes/Metrics/Secure/metrics_services/Templates/Counter_metrics/Should_create_counter_definition_using_MetricDefinition_parameter.yml +99 -0
- data/spec/vcr_cassettes/Metrics/Secure/metrics_services/Templates/Counter_metrics/Should_get_metrics_as_bucketed_results.yml +240 -0
- data/spec/vcr_cassettes/Metrics/Secure/metrics_services/Templates/Counter_metrics/Should_get_metrics_with_limit_and_order.yml +328 -0
- data/spec/vcr_cassettes/Metrics/Secure/metrics_services/Templates/Counter_metrics/Should_push_metric_data_to_existing_counter.yml +281 -0
- data/spec/vcr_cassettes/Metrics/Secure/metrics_services/Templates/Counter_metrics/Should_push_metric_data_to_non-existing_counter.yml +144 -0
- data/spec/vcr_cassettes/Metrics/Secure/metrics_services/Templates/Gauge_metrics/Should_create_gauge_definition_using_Hash.yml +99 -0
- data/spec/vcr_cassettes/Metrics/Secure/metrics_services/Templates/Gauge_metrics/Should_create_gauge_definition_using_MetricDefinition.yml +99 -0
- data/spec/vcr_cassettes/Metrics/Secure/metrics_services/Templates/Gauge_metrics/Should_push_metric_data_to_existing_gauge.yml +281 -0
- data/spec/vcr_cassettes/Metrics/Secure/metrics_services/Templates/Gauge_metrics/Should_push_metric_data_to_non-existing_gauge.yml +144 -0
- data/spec/vcr_cassettes/Metrics/Secure/metrics_services/Templates/Gauge_metrics/Should_return_periods.yml +97 -0
- data/spec/vcr_cassettes/Metrics/Secure/metrics_services/Templates/Gauge_metrics/Should_return_platform_memory.yml +50 -0
- data/spec/vcr_cassettes/Metrics/Secure/metrics_services/Templates/Gauge_metrics/Should_return_platform_memory_def.yml +51 -0
- data/spec/vcr_cassettes/Metrics/Secure/metrics_services/Templates/Gauge_metrics/Should_update_tags_for_gauge_definition.yml +240 -0
- data/spec/vcr_cassettes/Metrics/Secure/metrics_services/Templates/Mixed_metrics/Should_fetch_stats_for_mixed_metric.yml +364 -0
- data/spec/vcr_cassettes/Metrics/Secure/metrics_services/Templates/Mixed_metrics/Should_requests_raw_data_for_multiple_metrics.yml +326 -0
- data/spec/vcr_cassettes/Metrics/Secure/metrics_services/Templates/Mixed_metrics/Should_send_mixed_metric_request.yml +314 -0
- data/spec/vcr_cassettes/Metrics/Secure/metrics_services/Templates/Mixed_metrics/Should_send_mixed_metric_request_of_a_single_type.yml +285 -0
- data/spec/vcr_cassettes/Metrics/Secure/metrics_services/Templates/No_Tenant/Should_fail.yml +50 -0
- data/spec/vcr_cassettes/Metrics/Secure/metrics_services/Templates/Simple/Should_be_Cool.yml +48 -0
- data/spec/vcr_cassettes/Metrics/Secure/metrics_services/Templates/Status/Should_return_the_version.yml +44 -0
- data/spec/vcr_cassettes/Metrics/Secure/metrics_services/Templates/Tenants/Should_create_and_return_tenant.yml +99 -0
- data/spec/vcr_cassettes/Operation/NonSecure/Helpers/Templates/get_feed.yml +61 -0
- data/spec/vcr_cassettes/Operation/{Helpers → NonSecure/Helpers/Templates}/get_tenant.yml +8 -5
- data/spec/vcr_cassettes/Operation/NonSecure/Operation/Add_JDBC_driver_should_add_the_driver.json +23 -0
- data/spec/vcr_cassettes/Operation/NonSecure/Operation/Add_datasource_should_be_doable.json +23 -0
- data/spec/vcr_cassettes/Operation/{Operation → NonSecure/Operation}/Add_deployment_should_be_doable.json +4 -7
- data/spec/vcr_cassettes/Operation/NonSecure/Operation/Disable_should_be_performed_and_eventually_respond_with_success.json +23 -0
- data/spec/vcr_cassettes/Operation/NonSecure/Operation/Remove_JDBC_driver_should_be_performed_and_eventually_respond_with_success.json +23 -0
- data/spec/vcr_cassettes/Operation/NonSecure/Operation/Remove_datasource_should_be_performed_and_eventually_respond_with_success.json +23 -0
- data/spec/vcr_cassettes/Operation/NonSecure/Operation/Restart_can_be_run_multiple_times_in_parallel.json +32 -0
- data/spec/vcr_cassettes/Operation/NonSecure/Operation/Restart_should_be_performed_and_eventually_respond_with_success.json +23 -0
- data/spec/vcr_cassettes/Operation/NonSecure/Operation/Restart_should_not_be_performed_if_resource_path_is_wrong.json +23 -0
- data/spec/vcr_cassettes/Operation/NonSecure/Operation/Undeploy_deployment_should_be_performed_and_eventually_respond_with_success.json +23 -0
- data/spec/vcr_cassettes/Operation/{Operation → NonSecure/Operation}/should_not_be_possible_to_perform_on_closed_client.json +1 -1
- data/spec/vcr_cassettes/Operation/NonSecure/Websocket_connection/should_bail_with_hash_property_error_because_no_callback_at_all.json +9 -0
- data/spec/vcr_cassettes/Operation/NonSecure/Websocket_connection/should_bail_with_hash_property_error_because_no_error-callback_.json +9 -0
- data/spec/vcr_cassettes/Operation/{Websocket_connection → NonSecure/Websocket_connection}/should_bail_with_no_host.json +0 -0
- data/spec/vcr_cassettes/Operation/NonSecure/Websocket_connection/should_be_established.json +9 -0
- data/spec/vcr_cassettes/Operation/NonSecure/Websocket_connection/should_be_established_via_entrypoint.json +9 -0
- data/spec/vcr_cassettes/Operation/NonSecure/Websocket_connection/should_run_into_error_callback.json +18 -0
- data/spec/vcr_cassettes/Operation/{Websocket_connection → NonSecure/Websocket_connection}/should_run_into_error_callback_because_bad_hash_parameters.json +1 -1
- data/spec/vcr_cassettes/Operation/Secure/Helpers/Templates/get_feed.yml +61 -0
- data/spec/vcr_cassettes/Operation/Secure/Helpers/Templates/get_tenant.yml +55 -0
- data/spec/vcr_cassettes/Operation/Secure/Operation/Add_JDBC_driver_should_add_the_driver.json +23 -0
- data/spec/vcr_cassettes/Operation/Secure/Operation/Add_datasource_should_be_doable.json +23 -0
- data/spec/vcr_cassettes/Operation/Secure/Operation/Add_deployment_should_be_doable.json +23 -0
- data/spec/vcr_cassettes/Operation/Secure/Operation/Disable_should_be_performed_and_eventually_respond_with_success.json +23 -0
- data/spec/vcr_cassettes/Operation/Secure/Operation/Remove_JDBC_driver_should_be_performed_and_eventually_respond_with_success.json +23 -0
- data/spec/vcr_cassettes/Operation/Secure/Operation/Remove_datasource_should_be_performed_and_eventually_respond_with_success.json +23 -0
- data/spec/vcr_cassettes/Operation/Secure/Operation/Restart_can_be_run_multiple_times_in_parallel.json +32 -0
- data/spec/vcr_cassettes/Operation/Secure/Operation/Restart_should_be_performed_and_eventually_respond_with_success.json +23 -0
- data/spec/vcr_cassettes/Operation/Secure/Operation/Restart_should_not_be_performed_if_resource_path_is_wrong.json +23 -0
- data/spec/vcr_cassettes/Operation/Secure/Operation/Undeploy_deployment_should_be_performed_and_eventually_respond_with_success.json +23 -0
- data/spec/vcr_cassettes/Operation/Secure/Operation/should_not_be_possible_to_perform_on_closed_client.json +12 -0
- data/spec/vcr_cassettes/Operation/Secure/Websocket_connection/should_bail_with_hash_property_error_because_no_callback_at_all.json +9 -0
- data/spec/vcr_cassettes/Operation/Secure/Websocket_connection/should_bail_with_hash_property_error_because_no_error-callback_.json +9 -0
- data/spec/vcr_cassettes/Operation/Secure/Websocket_connection/should_bail_with_no_host.json +3 -0
- data/spec/vcr_cassettes/Operation/Secure/Websocket_connection/should_be_established.json +9 -0
- data/spec/vcr_cassettes/Operation/Secure/Websocket_connection/should_be_established_via_entrypoint.json +9 -0
- data/spec/vcr_cassettes/Operation/Secure/Websocket_connection/should_run_into_error_callback.json +18 -0
- data/spec/vcr_cassettes/Operation/Secure/Websocket_connection/should_run_into_error_callback_because_bad_hash_parameters.json +13 -0
- metadata +526 -282
- data/spec/vcr_cassettes/Metrics/metrics_0_16_0/Templates/Tenants/Should_create_and_return_tenant.yml +0 -95
- data/spec/vcr_cassettes/Metrics/metrics_services/Templates/Gauge_metrics/Should_return_platform_memory.yml +0 -48
- data/spec/vcr_cassettes/Metrics/metrics_services/Templates/Tenants/Should_create_and_return_tenant.yml +0 -95
- data/spec/vcr_cassettes/Operation/Operation/Add_JDBC_driver_should_add_the_driver.json +0 -26
- data/spec/vcr_cassettes/Operation/Operation/Add_datasource_should_be_doable.json +0 -26
- data/spec/vcr_cassettes/Operation/Operation/Disable_should_be_performed_and_eventually_respond_with_success.json +0 -26
- data/spec/vcr_cassettes/Operation/Operation/Remove_JDBC_driver_should_be_performed_and_eventually_respond_with_success.json +0 -26
- data/spec/vcr_cassettes/Operation/Operation/Remove_datasource_should_be_performed_and_eventually_respond_with_success.json +0 -26
- data/spec/vcr_cassettes/Operation/Operation/Restart_can_be_run_multiple_times_in_parallel.json +0 -40
- data/spec/vcr_cassettes/Operation/Operation/Restart_should_be_performed_and_eventually_respond_with_success.json +0 -26
- data/spec/vcr_cassettes/Operation/Operation/Restart_should_not_be_performed_if_resource_path_is_wrong.json +0 -26
- data/spec/vcr_cassettes/Operation/Operation/Undeploy_deployment_should_be_performed_and_eventually_respond_with_success.json +0 -26
- data/spec/vcr_cassettes/Operation/Websocket_connection/should_bail_with_hash_property_error_because_no_callback_at_all.json +0 -9
- data/spec/vcr_cassettes/Operation/Websocket_connection/should_bail_with_hash_property_error_because_no_error-callback_.json +0 -9
- data/spec/vcr_cassettes/Operation/Websocket_connection/should_be_established.json +0 -9
- data/spec/vcr_cassettes/Operation/Websocket_connection/should_be_established_via_entrypoint.json +0 -9
- data/spec/vcr_cassettes/Operation/Websocket_connection/should_run_into_error_callback.json +0 -13
data/spec/spec_helper.rb
CHANGED
@@ -30,43 +30,41 @@ end
|
|
30
30
|
|
31
31
|
module Hawkular::Metrics::RSpec
|
32
32
|
def setup_client_without_tenant(options = {})
|
33
|
+
options = options.dup
|
33
34
|
options[:tenant] = nil
|
34
35
|
mocked_version = options[:mocked_version]
|
35
36
|
::RSpec::Mocks.with_temporary_scope do
|
36
37
|
mocked_version.nil? ? mock_metrics_version : mock_metrics_version(mocked_version)
|
37
|
-
@client = Hawkular::Metrics::Client.new(
|
38
|
+
@client = Hawkular::Metrics::Client.new(entrypoint(options[:type], 'metrics'),
|
38
39
|
credentials(options), options)
|
39
40
|
return @client
|
40
41
|
end
|
41
42
|
end
|
42
43
|
|
43
44
|
def setup_client(options = {})
|
45
|
+
options = options.dup
|
44
46
|
options[:tenant] ||= 'hawkular'
|
45
47
|
mocked_version = options[:mocked_version]
|
46
48
|
::RSpec::Mocks.with_temporary_scope do
|
47
49
|
mocked_version.nil? ? mock_metrics_version : mock_metrics_version(mocked_version)
|
48
|
-
@client = Hawkular::Metrics::Client.new(
|
50
|
+
@client = Hawkular::Metrics::Client.new(entrypoint(options[:type], 'metrics'),
|
49
51
|
credentials(options), options)
|
50
52
|
end
|
51
53
|
@client
|
52
54
|
end
|
53
55
|
|
54
56
|
def setup_v8_client(options = {})
|
57
|
+
options = options.dup
|
55
58
|
options[:tenant] ||= 'hawkular'
|
56
59
|
options[:verify_ssl] ||= OpenSSL::SSL::VERIFY_NONE
|
57
60
|
::RSpec::Mocks.with_temporary_scope do
|
58
61
|
mock_metrics_version '0.8.0'
|
59
|
-
@client = Hawkular::Metrics::Client.new(
|
62
|
+
@client = Hawkular::Metrics::Client.new(entrypoint('v8', 'metrics'),
|
60
63
|
credentials_v8(options), options)
|
61
64
|
end
|
62
65
|
@client
|
63
66
|
end
|
64
67
|
|
65
|
-
def setup_client_new_tenant(options = {})
|
66
|
-
@tenant = 'vcr-test-tenant-123'
|
67
|
-
setup_client(tenant: @tenant, mocked_version: options[:mocked_version])
|
68
|
-
end
|
69
|
-
|
70
68
|
def credentials_v8(options = {})
|
71
69
|
{
|
72
70
|
token: options[:token].nil? ? config['token_v8'] : options[:token]
|
@@ -80,12 +78,6 @@ module Hawkular::Metrics::RSpec
|
|
80
78
|
}
|
81
79
|
end
|
82
80
|
|
83
|
-
def config
|
84
|
-
@config ||= YAML.load(
|
85
|
-
File.read(File.expand_path('endpoint.yml', File.dirname(__FILE__)))
|
86
|
-
)
|
87
|
-
end
|
88
|
-
|
89
81
|
def mock_metrics_version(version = '0.9.0.Final')
|
90
82
|
allow_any_instance_of(Hawkular::Metrics::Client).to receive(:fetch_version_and_status).and_return(
|
91
83
|
'Implementation-Version' => version
|
@@ -94,7 +86,7 @@ module Hawkular::Metrics::RSpec
|
|
94
86
|
|
95
87
|
# more or less generic method common for all metric types (counters, gauges, availabilities)
|
96
88
|
def create_metric_using_hash(endpoint, id, tenant_id)
|
97
|
-
endpoint.create(id: id, dataRetention: 123, tags: { some: 'value' }
|
89
|
+
endpoint.create(id: id, dataRetention: 123, tags: { some: 'value' })
|
98
90
|
metric = endpoint.get(id)
|
99
91
|
|
100
92
|
expect(metric).to be_a(Hawkular::Metrics::MetricDefinition)
|
@@ -160,10 +152,31 @@ module Hawkular::Operations::RSpec
|
|
160
152
|
object[:data]
|
161
153
|
end
|
162
154
|
end
|
155
|
+
|
156
|
+
def host_with_scheme(host, use_secure_connection)
|
157
|
+
"#{use_secure_connection ? 'https' : 'http'}://#{host}"
|
158
|
+
end
|
163
159
|
end
|
164
160
|
|
165
161
|
# globally used helper functions
|
166
162
|
module Helpers
|
163
|
+
def config
|
164
|
+
@config ||= YAML.load(
|
165
|
+
File.read(File.expand_path('endpoint.yml', File.dirname(__FILE__)))
|
166
|
+
)
|
167
|
+
end
|
168
|
+
|
169
|
+
def entrypoint(type, component = nil)
|
170
|
+
base = config[type.to_s.downcase]
|
171
|
+
entrypoint = "#{base['is_secure'] ? 'https' : 'http'}://#{base['host']}:#{base['port']}/"
|
172
|
+
entrypoint << config[component] unless component.nil?
|
173
|
+
end
|
174
|
+
|
175
|
+
def host(type)
|
176
|
+
base = config[type.to_s.downcase]
|
177
|
+
"#{base['host']}:#{base['port']}"
|
178
|
+
end
|
179
|
+
|
167
180
|
def make_template(base_directory, cassette_name, bindings)
|
168
181
|
cassette = cassette_name.gsub(/\s+/, '_')
|
169
182
|
input_file_path = "#{VCR.configuration.cassette_library_dir}/#{base_directory}/tmp/#{cassette}.yml"
|
@@ -194,23 +207,64 @@ module Helpers
|
|
194
207
|
end
|
195
208
|
yield if block_given?
|
196
209
|
end
|
210
|
+
record_cassette(prefix, bindings, explicit_cassette_name, run)
|
211
|
+
end
|
197
212
|
|
198
|
-
|
213
|
+
def record_cleanup(prefix)
|
214
|
+
FileUtils.rm_rf "#{VCR.configuration.cassette_library_dir}/#{prefix}/tmp"
|
215
|
+
end
|
216
|
+
|
217
|
+
def record_websocket(prefix, bindings, explicit_cassette_name, example = nil)
|
218
|
+
prefix.gsub!(/\s/, '_')
|
219
|
+
explicit_cassette_name.gsub!(/\s/, '_')
|
220
|
+
run = lambda do
|
221
|
+
unless example.nil?
|
222
|
+
if example.respond_to?(:run)
|
223
|
+
example.run
|
224
|
+
elsif example.respond_to?(:call)
|
225
|
+
example.call
|
226
|
+
end
|
227
|
+
end
|
228
|
+
yield if block_given?
|
229
|
+
end
|
230
|
+
|
231
|
+
record_websocket_cassette(prefix, bindings, explicit_cassette_name, run)
|
232
|
+
end
|
233
|
+
|
234
|
+
private
|
235
|
+
|
236
|
+
def record_cassette(prefix, bindings, explicit_cassette_name, run_lambda)
|
237
|
+
if ENV['VCR_UPDATE'] == '1' && bindings
|
199
238
|
VCR.use_cassette(prefix + '/tmp/' + explicit_cassette_name,
|
200
239
|
decode_compressed_response: true,
|
201
240
|
record: :all) do
|
202
|
-
|
241
|
+
run_lambda.call
|
203
242
|
end
|
204
243
|
make_template prefix, explicit_cassette_name, bindings
|
205
244
|
else
|
206
245
|
VCR.use_cassette(prefix + '/Templates/' + explicit_cassette_name,
|
207
246
|
decode_compressed_response: true,
|
208
247
|
erb: bindings,
|
209
|
-
record: :none) do
|
210
|
-
|
248
|
+
record: ENV['VCR_UPDATE'] == '1' ? :all : :none) do
|
249
|
+
run_lambda.call
|
211
250
|
end
|
212
251
|
end
|
213
252
|
end
|
253
|
+
|
254
|
+
def record_websocket_cassette(prefix, bindings, explicit_cassette_name, run_lambda)
|
255
|
+
options = {
|
256
|
+
record: :none,
|
257
|
+
decode_compressed_response: true
|
258
|
+
}
|
259
|
+
options[:erb] = bindings if bindings
|
260
|
+
if ENV['VCR_UPDATE'] == '1'
|
261
|
+
options[:record] = :all
|
262
|
+
options[:reverse_substitution] = true if bindings
|
263
|
+
end
|
264
|
+
WebSocketVCR.use_cassette(prefix + '/' + explicit_cassette_name, options) do
|
265
|
+
run_lambda.call
|
266
|
+
end
|
267
|
+
end
|
214
268
|
end
|
215
269
|
|
216
270
|
RSpec.configure do |config|
|
@@ -2,7 +2,7 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: get
|
5
|
-
uri: http
|
5
|
+
uri: http://<%= username %>:<%= password %>@localhost:8080/hawkular/inventory/status
|
6
6
|
body:
|
7
7
|
encoding: US-ASCII
|
8
8
|
string: ''
|
@@ -15,6 +15,8 @@ http_interactions:
|
|
15
15
|
- hawkular-client-ruby
|
16
16
|
Content-Type:
|
17
17
|
- application/json
|
18
|
+
Host:
|
19
|
+
- localhost:8080
|
18
20
|
response:
|
19
21
|
status:
|
20
22
|
code: 401
|
@@ -33,10 +35,10 @@ http_interactions:
|
|
33
35
|
Content-Length:
|
34
36
|
- '71'
|
35
37
|
Date:
|
36
|
-
-
|
38
|
+
- Wed, 10 Aug 2016 22:35:34 GMT
|
37
39
|
body:
|
38
40
|
encoding: UTF-8
|
39
41
|
string: "<html><head><title>Error</title></head><body>Unauthorized</body></html>"
|
40
42
|
http_version:
|
41
|
-
recorded_at:
|
42
|
-
recorded_with: VCR 3.0.
|
43
|
+
recorded_at: Wed, 10 Aug 2016 22:35:34 GMT
|
44
|
+
recorded_with: VCR 3.0.3
|
@@ -2,7 +2,7 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: get
|
5
|
-
uri: http
|
5
|
+
uri: http://<%= username %>:<%= password %>@localhost:8080/hawkular/inventory/status
|
6
6
|
body:
|
7
7
|
encoding: US-ASCII
|
8
8
|
string: ''
|
@@ -17,6 +17,8 @@ http_interactions:
|
|
17
17
|
- hawkular
|
18
18
|
Content-Type:
|
19
19
|
- application/json
|
20
|
+
Host:
|
21
|
+
- localhost:8080
|
20
22
|
response:
|
21
23
|
status:
|
22
24
|
code: 200
|
@@ -33,21 +35,21 @@ http_interactions:
|
|
33
35
|
Content-Length:
|
34
36
|
- '234'
|
35
37
|
Date:
|
36
|
-
-
|
38
|
+
- Wed, 10 Aug 2016 22:35:34 GMT
|
37
39
|
body:
|
38
40
|
encoding: UTF-8
|
39
41
|
string: |-
|
40
42
|
{
|
41
|
-
"Implementation-Version" : "0.17.
|
42
|
-
"Built-From-Git-SHA1" : "
|
43
|
+
"Implementation-Version" : "0.17.3.Final",
|
44
|
+
"Built-From-Git-SHA1" : "144a571ea8f3a819737c2937ccc0492d8a116bb4",
|
43
45
|
"Inventory-Implementation" : "org.hawkular.inventory.impl.tinkerpop.TinkerpopInventory",
|
44
46
|
"Initialized" : "true"
|
45
47
|
}
|
46
48
|
http_version:
|
47
|
-
recorded_at:
|
49
|
+
recorded_at: Wed, 10 Aug 2016 22:35:34 GMT
|
48
50
|
- request:
|
49
51
|
method: get
|
50
|
-
uri: http
|
52
|
+
uri: http://<%= username %>:<%= password %>@localhost:8080/hawkular/inventory/tenant
|
51
53
|
body:
|
52
54
|
encoding: US-ASCII
|
53
55
|
string: ''
|
@@ -62,6 +64,8 @@ http_interactions:
|
|
62
64
|
- hawkular
|
63
65
|
Content-Type:
|
64
66
|
- application/json
|
67
|
+
Host:
|
68
|
+
- localhost:8080
|
65
69
|
response:
|
66
70
|
status:
|
67
71
|
code: 200
|
@@ -78,7 +82,7 @@ http_interactions:
|
|
78
82
|
Pragma:
|
79
83
|
- no-cache
|
80
84
|
Date:
|
81
|
-
-
|
85
|
+
- Wed, 10 Aug 2016 22:35:34 GMT
|
82
86
|
Connection:
|
83
87
|
- keep-alive
|
84
88
|
Content-Type:
|
@@ -93,5 +97,5 @@ http_interactions:
|
|
93
97
|
"id" : "hawkular"
|
94
98
|
}
|
95
99
|
http_version:
|
96
|
-
recorded_at:
|
97
|
-
recorded_with: VCR 3.0.
|
100
|
+
recorded_at: Wed, 10 Aug 2016 22:35:34 GMT
|
101
|
+
recorded_with: VCR 3.0.3
|
@@ -2,7 +2,7 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: get
|
5
|
-
uri: http
|
5
|
+
uri: http://<%= username %>:<%= password %>@localhost:8080/hawkular/inventory/status
|
6
6
|
body:
|
7
7
|
encoding: US-ASCII
|
8
8
|
string: ''
|
@@ -17,6 +17,8 @@ http_interactions:
|
|
17
17
|
- hawkular
|
18
18
|
Content-Type:
|
19
19
|
- application/json
|
20
|
+
Host:
|
21
|
+
- localhost:8080
|
20
22
|
response:
|
21
23
|
status:
|
22
24
|
code: 200
|
@@ -33,21 +35,21 @@ http_interactions:
|
|
33
35
|
Content-Length:
|
34
36
|
- '234'
|
35
37
|
Date:
|
36
|
-
-
|
38
|
+
- Wed, 10 Aug 2016 22:35:34 GMT
|
37
39
|
body:
|
38
40
|
encoding: UTF-8
|
39
41
|
string: |-
|
40
42
|
{
|
41
|
-
"Implementation-Version" : "0.17.
|
42
|
-
"Built-From-Git-SHA1" : "
|
43
|
+
"Implementation-Version" : "0.17.3.Final",
|
44
|
+
"Built-From-Git-SHA1" : "144a571ea8f3a819737c2937ccc0492d8a116bb4",
|
43
45
|
"Inventory-Implementation" : "org.hawkular.inventory.impl.tinkerpop.TinkerpopInventory",
|
44
46
|
"Initialized" : "true"
|
45
47
|
}
|
46
48
|
http_version:
|
47
|
-
recorded_at:
|
49
|
+
recorded_at: Wed, 10 Aug 2016 22:35:34 GMT
|
48
50
|
- request:
|
49
51
|
method: get
|
50
|
-
uri: http
|
52
|
+
uri: http://<%= username %>:<%= password %>@localhost:8080/hawkular/inventory/tenant
|
51
53
|
body:
|
52
54
|
encoding: US-ASCII
|
53
55
|
string: ''
|
@@ -62,6 +64,8 @@ http_interactions:
|
|
62
64
|
- hawkular
|
63
65
|
Content-Type:
|
64
66
|
- application/json
|
67
|
+
Host:
|
68
|
+
- localhost:8080
|
65
69
|
response:
|
66
70
|
status:
|
67
71
|
code: 200
|
@@ -78,7 +82,7 @@ http_interactions:
|
|
78
82
|
Pragma:
|
79
83
|
- no-cache
|
80
84
|
Date:
|
81
|
-
-
|
85
|
+
- Wed, 10 Aug 2016 22:35:34 GMT
|
82
86
|
Connection:
|
83
87
|
- keep-alive
|
84
88
|
Content-Type:
|
@@ -93,5 +97,5 @@ http_interactions:
|
|
93
97
|
"id" : "hawkular"
|
94
98
|
}
|
95
99
|
http_version:
|
96
|
-
recorded_at:
|
97
|
-
recorded_with: VCR 3.0.
|
100
|
+
recorded_at: Wed, 10 Aug 2016 22:35:34 GMT
|
101
|
+
recorded_with: VCR 3.0.3
|
@@ -3,12 +3,12 @@
|
|
3
3
|
{
|
4
4
|
"operation": "read",
|
5
5
|
"type": "text",
|
6
|
-
"data": "{\n \"path\" : \"/t;hawkular/f;<%= uuid_prefix %>-feed/r;<%= uuid_prefix %>-r126\",\n \"properties\" : {\n \"version\" : 1.0\n },\n \"name\" : \"My Resource 1\",\n \"identityHash\" : \"
|
6
|
+
"data": "{\n \"path\" : \"/t;hawkular/f;<%= uuid_prefix %>-feed/r;<%= uuid_prefix %>-r126\",\n \"properties\" : {\n \"version\" : 1.0\n },\n \"name\" : \"My Resource 1\",\n \"identityHash\" : \"d27f513cfc856e3ba491eb7a392424456e03e\",\n \"type\" : {\n \"path\" : \"/t;hawkular/f;<%= uuid_prefix %>-feed/rt;<%= uuid_prefix %>-rt-123\",\n \"name\" : \"ResourceType\",\n \"identityHash\" : \"d2ad2056fbf7673bfc3462aad80803e4b7749d\",\n \"id\" : \"<%= uuid_prefix %>-rt-123\"\n },\n \"id\" : \"<%= uuid_prefix %>-r126\"\n}"
|
7
7
|
},
|
8
8
|
{
|
9
9
|
"operation": "read",
|
10
10
|
"type": "text",
|
11
|
-
"data": "{\n \"path\" : \"/t;hawkular/f;<%= uuid_prefix %>-feed/r;<%= uuid_prefix %>-r127\",\n \"properties\" : {\n \"version\" : 1.1\n },\n \"name\" : \"My Resource 2\",\n \"identityHash\" : \"
|
11
|
+
"data": "{\n \"path\" : \"/t;hawkular/f;<%= uuid_prefix %>-feed/r;<%= uuid_prefix %>-r127\",\n \"properties\" : {\n \"version\" : 1.1\n },\n \"name\" : \"My Resource 2\",\n \"identityHash\" : \"9a5a95c450a2656e1e139ee1f3d1bd7485265a7\",\n \"type\" : {\n \"path\" : \"/t;hawkular/f;<%= uuid_prefix %>-feed/rt;<%= uuid_prefix %>-rt-123\",\n \"name\" : \"ResourceType\",\n \"identityHash\" : \"d2ad2056fbf7673bfc3462aad80803e4b7749d\",\n \"id\" : \"<%= uuid_prefix %>-rt-123\"\n },\n \"id\" : \"<%= uuid_prefix %>-r127\"\n}"
|
12
12
|
},
|
13
13
|
{
|
14
14
|
"operation": "close"
|
@@ -18,7 +18,7 @@
|
|
18
18
|
{
|
19
19
|
"operation": "read",
|
20
20
|
"type": "text",
|
21
|
-
"data": "{\n \"path\" : \"/t;hawkular/f;<%= uuid_prefix %>-feed\",\n \"properties\" : {\n \"__identityHash\" : \"
|
21
|
+
"data": "{\n \"path\" : \"/t;hawkular/f;<%= uuid_prefix %>-feed\",\n \"properties\" : {\n \"__identityHash\" : \"e6b84ac397bb188d813c8d46d28da691732af3ae\"\n },\n \"identityHash\" : \"e6b84ac397bb188d813c8d46d28da691732af3ae\",\n \"id\" : \"<%= uuid_prefix %>-feed\"\n}"
|
22
22
|
},
|
23
23
|
{
|
24
24
|
"operation": "close"
|
@@ -28,7 +28,7 @@
|
|
28
28
|
{
|
29
29
|
"operation": "read",
|
30
30
|
"type": "text",
|
31
|
-
"data": "{\n \"path\" : \"/t;hawkular/f;<%= uuid_prefix %>-feed/rt;<%= uuid_prefix %>-rt-123\",\n \"name\" : \"ResourceType\",\n \"identityHash\" : \"
|
31
|
+
"data": "{\n \"path\" : \"/t;hawkular/f;<%= uuid_prefix %>-feed/rt;<%= uuid_prefix %>-rt-123\",\n \"name\" : \"ResourceType\",\n \"identityHash\" : \"d2ad2056fbf7673bfc3462aad80803e4b7749d\",\n \"id\" : \"<%= uuid_prefix %>-rt-123\"\n}"
|
32
32
|
},
|
33
33
|
{
|
34
34
|
"operation": "close"
|
@@ -38,7 +38,7 @@
|
|
38
38
|
{
|
39
39
|
"operation": "read",
|
40
40
|
"type": "text",
|
41
|
-
"data": "{\n \"path\" : \"/t;hawkular/f;<%= uuid_prefix %>-feed\",\n \"identityHash\" : \"
|
41
|
+
"data": "{\n \"path\" : \"/t;hawkular/f;<%= uuid_prefix %>-feed\",\n \"identityHash\" : \"b23fc38f96172cf290deca88f193d41b57502490\",\n \"id\" : \"<%= uuid_prefix %>-feed\"\n}"
|
42
42
|
},
|
43
43
|
{
|
44
44
|
"operation": "close"
|
@@ -2,7 +2,7 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: get
|
5
|
-
uri: http
|
5
|
+
uri: http://<%= super_secret_username %>:<%= super_secret_password %>@localhost:8080/hawkular/inventory/tenant
|
6
6
|
body:
|
7
7
|
encoding: US-ASCII
|
8
8
|
string: ''
|
@@ -17,6 +17,8 @@ http_interactions:
|
|
17
17
|
- hawkular
|
18
18
|
Content-Type:
|
19
19
|
- application/json
|
20
|
+
Host:
|
21
|
+
- localhost:8080
|
20
22
|
response:
|
21
23
|
status:
|
22
24
|
code: 200
|
@@ -33,7 +35,7 @@ http_interactions:
|
|
33
35
|
Pragma:
|
34
36
|
- no-cache
|
35
37
|
Date:
|
36
|
-
-
|
38
|
+
- Wed, 10 Aug 2016 22:35:40 GMT
|
37
39
|
Connection:
|
38
40
|
- keep-alive
|
39
41
|
Content-Type:
|
@@ -48,10 +50,10 @@ http_interactions:
|
|
48
50
|
"id" : "hawkular"
|
49
51
|
}
|
50
52
|
http_version:
|
51
|
-
recorded_at:
|
53
|
+
recorded_at: Wed, 10 Aug 2016 22:35:40 GMT
|
52
54
|
- request:
|
53
55
|
method: get
|
54
|
-
uri: http
|
56
|
+
uri: http://<%= super_secret_username %>:<%= super_secret_password %>@localhost:8080/hawkular/inventory/tenant
|
55
57
|
body:
|
56
58
|
encoding: US-ASCII
|
57
59
|
string: ''
|
@@ -66,6 +68,8 @@ http_interactions:
|
|
66
68
|
- hawkular
|
67
69
|
Content-Type:
|
68
70
|
- application/json
|
71
|
+
Host:
|
72
|
+
- localhost:8080
|
69
73
|
response:
|
70
74
|
status:
|
71
75
|
code: 200
|
@@ -82,7 +86,7 @@ http_interactions:
|
|
82
86
|
Pragma:
|
83
87
|
- no-cache
|
84
88
|
Date:
|
85
|
-
-
|
89
|
+
- Wed, 10 Aug 2016 22:35:40 GMT
|
86
90
|
Connection:
|
87
91
|
- keep-alive
|
88
92
|
Content-Type:
|
@@ -97,10 +101,10 @@ http_interactions:
|
|
97
101
|
"id" : "hawkular"
|
98
102
|
}
|
99
103
|
http_version:
|
100
|
-
recorded_at:
|
104
|
+
recorded_at: Wed, 10 Aug 2016 22:35:40 GMT
|
101
105
|
- request:
|
102
106
|
method: get
|
103
|
-
uri: http
|
107
|
+
uri: http://<%= super_secret_username %>:<%= super_secret_password %>@localhost:8080/hawkular/inventory/tenant
|
104
108
|
body:
|
105
109
|
encoding: US-ASCII
|
106
110
|
string: ''
|
@@ -115,6 +119,8 @@ http_interactions:
|
|
115
119
|
- hawkular
|
116
120
|
Content-Type:
|
117
121
|
- application/json
|
122
|
+
Host:
|
123
|
+
- localhost:8080
|
118
124
|
response:
|
119
125
|
status:
|
120
126
|
code: 200
|
@@ -131,7 +137,7 @@ http_interactions:
|
|
131
137
|
Pragma:
|
132
138
|
- no-cache
|
133
139
|
Date:
|
134
|
-
-
|
140
|
+
- Wed, 10 Aug 2016 22:35:40 GMT
|
135
141
|
Connection:
|
136
142
|
- keep-alive
|
137
143
|
Content-Type:
|
@@ -146,10 +152,10 @@ http_interactions:
|
|
146
152
|
"id" : "hawkular"
|
147
153
|
}
|
148
154
|
http_version:
|
149
|
-
recorded_at:
|
155
|
+
recorded_at: Wed, 10 Aug 2016 22:35:40 GMT
|
150
156
|
- request:
|
151
157
|
method: get
|
152
|
-
uri: http
|
158
|
+
uri: http://<%= super_secret_username %>:<%= super_secret_password %>@localhost:8080/hawkular/inventory/tenant
|
153
159
|
body:
|
154
160
|
encoding: US-ASCII
|
155
161
|
string: ''
|
@@ -164,6 +170,8 @@ http_interactions:
|
|
164
170
|
- hawkular
|
165
171
|
Content-Type:
|
166
172
|
- application/json
|
173
|
+
Host:
|
174
|
+
- localhost:8080
|
167
175
|
response:
|
168
176
|
status:
|
169
177
|
code: 200
|
@@ -180,7 +188,7 @@ http_interactions:
|
|
180
188
|
Pragma:
|
181
189
|
- no-cache
|
182
190
|
Date:
|
183
|
-
-
|
191
|
+
- Wed, 10 Aug 2016 22:35:40 GMT
|
184
192
|
Connection:
|
185
193
|
- keep-alive
|
186
194
|
Content-Type:
|
@@ -195,5 +203,5 @@ http_interactions:
|
|
195
203
|
"id" : "hawkular"
|
196
204
|
}
|
197
205
|
http_version:
|
198
|
-
recorded_at:
|
199
|
-
recorded_with: VCR 3.0.
|
206
|
+
recorded_at: Wed, 10 Aug 2016 22:35:40 GMT
|
207
|
+
recorded_with: VCR 3.0.3
|