github.com/lulzWill/go-agent@v2.1.2+incompatible/internal/crossagent/cross_agent_tests/utilization_vendor_specific/pcf.json (about)

     1  [
     2    {
     3      "testname": "routine failure to retrieve environment variables, no vendor hash or supportability metric reported",
     4      "env_vars": {
     5        "CF_INSTANCE_GUID": {
     6          "response": null,
     7          "timeout": true
     8        },
     9        "CF_INSTANCE_IP": {
    10          "response": null,
    11          "timeout": true
    12        },
    13        "MEMORY_LIMIT": {
    14          "response": null,
    15          "timeout": true
    16        }
    17      },
    18      "expected_vendors_hash": null,
    19      "expected_metrics": {
    20        "Supportability/utilization/pcf/error": {
    21          "call_count": 0
    22        }
    23      }
    24    },
    25    {
    26      "testname": "cf_instance_guid, cf_instance_ip, memory_limit are all happy",
    27      "env_vars": {
    28        "CF_INSTANCE_GUID": {
    29          "response": "fd326c0e-847e-47a1-65cc-45f6",
    30          "timeout": false
    31        },
    32        "CF_INSTANCE_IP": {
    33          "response": "10.10.149.48",
    34          "timeout": false
    35        },
    36        "MEMORY_LIMIT": {
    37          "response": "1024m",
    38          "timeout": false
    39        }
    40      },
    41      "expected_vendors_hash": {
    42        "pcf": {
    43          "cf_instance_guid": "fd326c0e-847e-47a1-65cc-45f6",
    44          "cf_instance_ip": "10.10.149.48",
    45          "memory_limit": "1024m"
    46        }
    47      }
    48    },
    49    {
    50      "testname": "cf_instance_guid with invalid characters",
    51      "env_vars": {
    52        "CF_INSTANCE_GUID": {
    53          "response": "<script>lol</script>",
    54          "timeout": false
    55        },
    56        "CF_INSTANCE_IP": {
    57          "response": "10.10.149.48",
    58          "timeout": false
    59        },
    60        "MEMORY_LIMIT": {
    61          "response": "1024m",
    62          "timeout": false
    63        }
    64      },
    65      "expected_vendors_hash": null,
    66      "expected_metrics": {
    67        "Supportability/utilization/pcf/error": {
    68          "call_count": 1
    69        }
    70      }
    71    },
    72    {
    73      "testname": "cf_instance_guid too long",
    74      "env_vars": {
    75        "CF_INSTANCE_GUID": {
    76          "response": "zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz",
    77          "timeout": false
    78        },
    79        "CF_INSTANCE_IP": {
    80          "response": "10.10.149.48",
    81          "timeout": false
    82        },
    83        "MEMORY_LIMIT": {
    84          "response": "1024m",
    85          "timeout": false
    86        }
    87      },
    88      "expected_vendors_hash": null,
    89      "expected_metrics": {
    90        "Supportability/utilization/pcf/error": {
    91          "call_count": 1
    92        }
    93      }
    94    },
    95    {
    96      "testname": "cf_instance_ip with invalid characters",
    97      "env_vars": {
    98        "CF_INSTANCE_GUID": {
    99          "response": "fd326c0e-847e-47a1-65cc-45f6",
   100          "timeout": false
   101        },
   102        "CF_INSTANCE_IP": {
   103          "response": "<script>lol</script>",
   104          "timeout": false
   105        },
   106        "MEMORY_LIMIT": {
   107          "response": "1024m",
   108          "timeout": false
   109        }
   110      },
   111      "expected_vendors_hash": null,
   112      "expected_metrics": {
   113        "Supportability/utilization/pcf/error": {
   114          "call_count": 1
   115        }
   116      }
   117    },
   118    {
   119      "testname": "cf_instance_ip too long",
   120      "env_vars": {
   121        "CF_INSTANCE_GUID": {
   122          "response": "fd326c0e-847e-47a1-65cc-45f6",
   123          "timeout": false
   124        },
   125        "CF_INSTANCE_IP": {
   126          "response": "zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz",
   127          "timeout": false
   128        },
   129        "MEMORY_LIMIT": {
   130          "response": "1024m",
   131          "timeout": false
   132        }
   133      },
   134      "expected_vendors_hash": null,
   135      "expected_metrics": {
   136        "Supportability/utilization/pcf/error": {
   137          "call_count": 1
   138        }
   139      }
   140    },
   141    {
   142      "testname": "memory_limit with invalid characters",
   143      "env_vars": {
   144        "CF_INSTANCE_GUID": {
   145          "response": "fd326c0e-847e-47a1-65cc-45f6",
   146          "timeout": false
   147        },
   148        "CF_INSTANCE_IP": {
   149          "response": "10.10.149.48",
   150          "timeout": false
   151        },
   152        "MEMORY_LIMIT": {
   153          "response": "<script>lol</script>",
   154          "timeout": false
   155        }
   156      },
   157      "expected_vendors_hash": null,
   158      "expected_metrics": {
   159        "Supportability/utilization/pcf/error": {
   160          "call_count": 1
   161        }
   162      }
   163    },
   164    {
   165      "testname": "memory_limit too long",
   166      "env_vars": {
   167        "CF_INSTANCE_GUID": {
   168          "response": "fd326c0e-847e-47a1-65cc-45f6",
   169          "timeout": false
   170        },
   171        "CF_INSTANCE_IP": {
   172          "response": "10.10.149.48",
   173          "timeout": false
   174        },
   175        "MEMORY_LIMIT": {
   176          "response": "zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz",
   177          "timeout": false
   178        }
   179      },
   180      "expected_vendors_hash": null,
   181      "expected_metrics": {
   182        "Supportability/utilization/pcf/error": {
   183          "call_count": 1
   184        }
   185      }
   186    },
   187    {
   188      "testname": "UTF-8 high codepoints",
   189      "env_vars": {
   190        "CF_INSTANCE_GUID": {
   191          "response": "滈 橀槶澉 鞻饙騴 鱙鷭黂 甗糲 紁羑 嗂 蛶觢豥 餤駰鬳 釂鱞鸄",
   192          "timeout": false
   193        },
   194        "CF_INSTANCE_IP": {
   195          "response": "10.10.149.48",
   196          "timeout": false
   197        },
   198        "MEMORY_LIMIT": {
   199          "response": "1024m",
   200          "timeout": false
   201        }
   202      },
   203      "expected_vendors_hash": {
   204        "pcf": {
   205          "cf_instance_guid": "滈 橀槶澉 鞻饙騴 鱙鷭黂 甗糲 紁羑 嗂 蛶觢豥 餤駰鬳 釂鱞鸄",
   206          "cf_instance_ip": "10.10.149.48",
   207          "memory_limit": "1024m"
   208        }
   209      }
   210    },
   211    {
   212      "testname": "comma with multibyte characters",
   213      "env_vars": {
   214        "CF_INSTANCE_GUID": {
   215          "response": "滈 橀槶澉 鞻饙騴 鱙鷭黂 甗糲, 紁羑 嗂 蛶觢豥 餤駰鬳 釂鱞鸄",
   216          "timeout": false
   217        },
   218        "CF_INSTANCE_IP": {
   219          "response": "10.10.149.48",
   220          "timeout": false
   221        },
   222        "MEMORY_LIMIT": {
   223          "response": "1024m",
   224          "timeout": false
   225        }
   226      },
   227      "expected_vendors_hash": null,
   228      "expected_metrics": {
   229        "Supportability/utilization/pcf/error": {
   230          "call_count": 1
   231        }
   232      }
   233    },
   234    {
   235      "testname": "Exclamation point in response",
   236      "env_vars": {
   237        "CF_INSTANCE_GUID": {
   238          "response": "Bang!",
   239          "timeout": false
   240        },
   241        "CF_INSTANCE_IP": {
   242          "response": "10.10.149.48",
   243          "timeout": false
   244        },
   245        "MEMORY_LIMIT": {
   246          "response": "1024m",
   247          "timeout": false
   248        }
   249      },
   250      "expected_vendors_hash": null,
   251      "expected_metrics": {
   252        "Supportability/utilization/pcf/error": {
   253          "call_count": 1
   254        }
   255      }
   256    },
   257    {
   258      "testname": "Valid punctuation in response",
   259      "env_vars": {
   260        "CF_INSTANCE_GUID": {
   261          "response": "a-b_c.3... and/or 503 867-5309",
   262          "timeout": false
   263        },
   264        "CF_INSTANCE_IP": {
   265          "response": "10.10.149.48",
   266          "timeout": false
   267        },
   268        "MEMORY_LIMIT": {
   269          "response": "1024m",
   270          "timeout": false
   271        }
   272      },
   273      "expected_vendors_hash": {
   274        "pcf": {
   275          "cf_instance_guid": "a-b_c.3... and/or 503 867-5309",
   276          "cf_instance_ip": "10.10.149.48",
   277          "memory_limit": "1024m"
   278        }
   279      }
   280    }
   281  ]