github.com/lulzWill/go-agent@v2.1.2+incompatible/internal/crossagent/cross_agent_tests/utilization/README.md (about)

     1  # The Utilization Tests
     2  
     3  The Utilization tests ensure that the appropriate information is being gathered for pricing. It is centered around ensuring that the JSON generated by all agents is correct. Each JSON block is a test case, with potentially the following fields:
     4  
     5    - `testname`: The name of the test.
     6    - `input_total_ram_mib`: The total ram number calculated by the agent.
     7    - `input_logical_processors`: The number of logical processors calculated by the agent.
     8    - `input_hostname`: The `hostname` calculated by the agent.
     9    - `input_aws_id`: The aws `id` determined by the agent.
    10    - `input_aws_type`: The aws `type` determined by the agent.
    11    - `input_aws_zone`: The aws `zone` determined by the agent.
    12    - `input_environment_variables`: Any environment variables which have been set.
    13    - `expected_output_json`: The expected JSON output from the agent for the `utilization` hash.
    14  
    15  New fields for Google Cloud Platform (gcp), Pivotal Cloud Foundry (pcf), and Azure added as of [Utilization spec version 7](https://source.datanerd.us/agents/agent-specs/blob/c78cddeaa5fa23dce892b8c6da95b9f900636c35/Utilization.md):
    16    - `input_gcp_id`: The gcp `id` determined by the agent.
    17    - `input_gcp_type`: The gcp `machineType` determined by the agent.
    18    - `input_gcp_name`: The gcp `name` determined by the agent.
    19    - `input_gcp_zone`: The gcp `zone` determined by the agent.
    20    - `input_pcf_guid`: The pcf `cf_instance_guid` determined by the agent.
    21    - `input_pcf_ip`: The pcf `cf_instance_ip` determined by the agent.
    22    - `input_pcf_mem_limit`: The pcf `memory_limit` determined by the agent.
    23    - `input_azure_location`: The azure `location` determined by the agent.
    24    - `input_azure_name`: The azure `name` determined by the agent.
    25    - `input_azure_id`: The azure `vmId` determined by the agent.
    26    - `input_azure_size`: The azure `vmSize` determined by the agent.
    27   
    28  Test cases for `boot_id.json` added as of [Utilization spec version 7](https://source.datanerd.us/agents/agent-specs/blob/c78cddeaa5fa23dce892b8c6da95b9f900636c35/Utilization.md):
    29    - `testname`: The name of the test.
    30    - `input_total_ram_mib`: The total ram number calculated by the agent.
    31    - `input_logical_processors`: The number of logical processors calculated by the agent.
    32    - `input_hostname`: The hostname calculated by the agent.
    33    - `input_boot_id`: The `boot_id` determined by the agent.
    34    - `expected_output_json`: The expected JSON output from the agent for the utilization hash.
    35    - `expected_metrics`: Supportability metrics that are either expected or unexpected in a given case. If the `call_count` is 0 it should be asserted that the Supportability metric was not sent.