From e5ad2dc7633f9ad6ac30d3a9bc8e959f28829f8a Mon Sep 17 00:00:00 2001 From: Thomas Vincent Date: Sun, 15 Nov 2026 15:36:03 -0800 Subject: [PATCH] fix: count DigitalOcean cpu as an agent metric, from the first live check The first live run on #16 found that /v2/monitoring/metrics/droplet/cpu returns no series on Droplets without the metrics agent, although DigitalOcean's features page lists CPU among the default metrics. Bandwidth returned data on every Droplet. The catalog now marks cpu as an agent metric, so the default set is the four bandwidth series. The research pages record the other live results: cumulative cpu values and the full mode list, 120-second samples over an hour with downsampling for longer windows, 401 on a bad token, the rate-limit header values, and per_page=200 accepted. Expired and under-scoped tokens, load balancer metrics, and paging past one page are still open. Signed-off-by: Thomas Vincent --- docs/PLAN.md | 8 ++++---- docs/research/cost-model.md | 2 +- docs/research/metric-catalogs.md | 6 +++--- docs/research/provider-facts.md | 20 +++++++++++--------- lib/DigitalOceanCatalog.php | 7 ++++--- tests/Unit/DigitalOceanDriverTest.php | 6 +++--- 6 files changed, 26 insertions(+), 23 deletions(-) diff --git a/docs/PLAN.md b/docs/PLAN.md index 54bc56b..eb0cdf8 100644 --- a/docs/PLAN.md +++ b/docs/PLAN.md @@ -95,10 +95,10 @@ Each row is a milestone 1 test, because a change in any of them changes the desi | Fact | Consequence | Source | |---|---|---| | Requests use `Authorization: Bearer `. Custom-scoped tokens exist; `droplet:read`, `load_balancer:read`, and `monitoring:read` cover inventory and metrics. Tokens can expire. | The plugin asks for a custom token with read scopes only, and treats 401 as expired or revoked and 403 as a missing scope. The metrics endpoints declare no 403 response, so that mapping is *live*. | [Scopes](https://docs.digitalocean.com/reference/api/scopes/), [tokens](https://docs.digitalocean.com/reference/api/create-personal-access-token/) | -| Droplet metrics are one `GET` per metric under `/v2/monitoring/metrics/droplet/` (`cpu`, `bandwidth`, `load_1`, `memory_*`, `filesystem_*`), with `host_id`, `start`, and `end`. `bandwidth` also needs `interface` and `direction`, and is in megabits per second. There is no disk I/O or packet metric in the API. | A Droplet's CPU and four bandwidth series cost five requests per collection, and are its only agent-free series. | [OpenAPI spec](https://docs.digitalocean.com/reference/api/reference/openapi.json) | -| Responses are Prometheus-style matrices with string values. No step parameter, sample interval, or retention is documented. | The real resolution, and whether `cpu` values are cumulative, are *live* and are measured before templates fix an RRD step. | OpenAPI spec | -| Memory, load, and filesystem metrics need the metrics agent on the Droplet. | Without it those series are empty; the plugin reports "agent not installed" rather than an error, and does not offer those graphs. | [Monitoring features](https://docs.digitalocean.com/products/monitoring/details/features/) | -| Rate limits are 5,000 requests per hour and 250 per minute per token, with `ratelimit-limit`, `ratelimit-remaining`, `ratelimit-reset`, and `retry-after` on 429. | Request budget, not cost, bounds DigitalOcean collection. Five requests per Droplet every five minutes is 60 per hour, so one token covers about 80 Droplets at that rate with nothing else using it. | OpenAPI spec, "Rate Limit" | +| Droplet metrics are one `GET` per metric under `/v2/monitoring/metrics/droplet/` (`cpu`, `bandwidth`, `load_1`, `memory_*`, `filesystem_*`), with `host_id`, `start`, and `end`. `bandwidth` also needs `interface` and `direction`, and is in megabits per second. There is no disk I/O or packet metric in the API. | A Droplet's four bandwidth series cost four requests per collection, and are its only agent-free series. | [OpenAPI spec](https://docs.digitalocean.com/reference/api/reference/openapi.json) | +| Responses are Prometheus-style matrices with string values. No step parameter, sample interval, or retention is documented. | Measured live (#16): samples are 120 s apart over a one-hour window, the newest under 10 s old, and `cpu` values are cumulative. Longer windows are downsampled. | OpenAPI spec | +| Memory, load, filesystem, and (found live, #16) CPU metrics need the metrics agent on the Droplet. | Without it those series are empty; the plugin reports "agent not installed" rather than an error, and does not offer those graphs. | [Monitoring features](https://docs.digitalocean.com/products/monitoring/details/features/) | +| Rate limits are 5,000 requests per hour and 250 per minute per token, with `ratelimit-limit`, `ratelimit-remaining`, `ratelimit-reset`, and `retry-after` on 429. | Request budget, not cost, bounds DigitalOcean collection. Four requests per Droplet every five minutes is 48 per hour, so one token covers about 104 Droplets at that rate with nothing else using it. | OpenAPI spec, "Rate Limit" | | Lists page with `page` and `per_page`; `/v2/droplets` and `/v2/load_balancers` accept up to 200. | The plugin uses 200 (*live*: confirm the server accepts it) and follows `links.pages.next`. | OpenAPI spec | **AWS** diff --git a/docs/research/cost-model.md b/docs/research/cost-model.md index 9ebd54f..422f3ad 100644 --- a/docs/research/cost-model.md +++ b/docs/research/cost-model.md @@ -19,7 +19,7 @@ Research for [#22](https://github.com/somethingwithproof/plugin_cloud/issues/22) - Requests per hour: `S × 3600 / I`, plus discovery: `ceil(R / 200)` list requests per resource type per discovery run (hourly by default). - Limits per token: 5,000 an hour and 250 a minute. The collector budgets `share × 5,000` an hour (default share 50 percent) and spreads requests so no minute exceeds 250. -- Capacity at the defaults: `0.5 × 5,000 / 12 = 208` series at 300 s, which is 41 Droplets with the five agent-free series. At 100 percent share it is 416 series, or 83 Droplets. +- Capacity at the defaults: `0.5 × 5,000 / 12 = 208` series at 300 s, which is 52 Droplets with the four agent-free series. At 100 percent share it is 416 series, or 104 Droplets. - Cost: none found. No page states DigitalOcean API calls are free, so the plugin reports "no charge documented", not "free". **AWS.** `GetMetricData` bills each metric requested, counting up to five statistics of one metric as one. diff --git a/docs/research/metric-catalogs.md b/docs/research/metric-catalogs.md index 52ac628..6bdf575 100644 --- a/docs/research/metric-catalogs.md +++ b/docs/research/metric-catalogs.md @@ -2,7 +2,7 @@ Research for [#21](https://github.com/somethingwithproof/plugin_cloud/issues/21), run 2026-11-14. Question: for each phase 1 to 4 resource type, which metrics does the plugin collect by default, and with what statistic, period, unit, conversion, data source name, and RRD bounds? -**Result.** One table per resource type follows, built from each provider's metric reference. Agent-free defaults are five series for a DigitalOcean Droplet, 14 for an EC2 instance, 9 for a Compute Engine instance, and 8 for an Azure VM. DigitalOcean documents no period or delay for any metric, and AWS and Azure document no publication delay, so those values come from the [live checks](provider-facts.md#live-checks) before templates fix an RRD step. All 77 data source names meet Cacti's limit (below). +**Result.** One table per resource type follows, built from each provider's metric reference. Agent-free defaults are four series for a DigitalOcean Droplet, 14 for an EC2 instance, 9 for a Compute Engine instance, and 8 for an Azure VM. DigitalOcean documents no period or delay for any metric (the live check on #16 measured 120 s samples), and AWS and Azure document no publication delay, so those values come from the [live checks](provider-facts.md#live-checks) before templates fix an RRD step. All 77 data source names meet Cacti's limit (below). ## Conventions @@ -23,7 +23,7 @@ Reference: OpenAPI spec, Monitoring section, `https://docs.digitalocean.com/refe | Provider metric (path under `/v2/monitoring/metrics/droplet/`) | Dimensions / labels / filter | Stat or aligner | Native period | Delay | Provider unit | Conversion to Cacti value | DS name | RRD min / max | |---|---|---|---|---|---|---|---|---| -| `cpu` | label `mode` (example shows idle, iowait, irq, nice, softirq, steal; the example is cut off, so the full mode list is unverified) | none (raw series, one per mode) | not documented | not documented | cumulative seconds per mode (inferred from the example, the spec does not state it) | `100 * (delta total - delta idle) / delta total` over the two newest samples, summed over modes. GAUGE percent. If live data shows values are not cumulative, change the conversion. | `do_cpu_pct` | 0 / 100 | +| `cpu` | label `mode`: idle, iowait, irq, nice, softirq, steal, system, user (live, #16). **AGENT**: no series without the metrics agent (live) | none (raw series, one per mode) | not documented | not documented | cumulative seconds per mode (confirmed live: no mode decreased over an hour) | `100 * (delta total - delta idle) / delta total` over the two newest samples, summed over modes. GAUGE percent. | `do_cpu_pct` | 0 / 100 | | `bandwidth` | `interface=public`, `direction=inbound` | none | not documented | not documented | megabits per second (spec states Mbps) | value * 1,000,000 = bits per second, GAUGE | `do_bw_pub_in` | 0 / U | | `bandwidth` | `interface=public`, `direction=outbound` | none | not documented | not documented | Mbps | same | `do_bw_pub_out` | 0 / U | | `bandwidth` | `interface=private`, `direction=inbound` | none | not documented | not documented | Mbps | same | `do_bw_prv_in` | 0 / U | @@ -38,7 +38,7 @@ Reference: OpenAPI spec, Monitoring section, `https://docs.digitalocean.com/refe | `filesystem_free` **AGENT** | labels `device`, `fstype`, `mountpoint` | none | not documented | not documented | bytes (example value 25832407040) | absolute, GAUGE, one index per mountpoint | `do_fs_free` | 0 / U | | `filesystem_size` **AGENT** | same | none | not documented | not documented | bytes | absolute, GAUGE | `do_fs_size` | 0 / U | -Default set (agent-free): `do_cpu_pct`, `do_bw_pub_in`, `do_bw_pub_out`, `do_bw_prv_in`, `do_bw_prv_out`. That is five requests per Droplet per collection, matching the plan. Packet counts and disk I/O are **not available through the API** (no endpoint exists), although the control panel shows disk I/O. +Default set (agent-free): `do_bw_pub_in`, `do_bw_pub_out`, `do_bw_prv_in`, `do_bw_prv_out`. That is four requests per Droplet per collection. `do_cpu_pct` was in this set until the live check on #16 found that `cpu` needs the agent; it stays in the catalog for Droplets that have one. Packet counts and disk I/O are **not available through the API** (no endpoint exists), although the control panel shows disk I/O. ### Load balancers (index: load balancer ID, passed as `lb_id` query parameter) diff --git a/docs/research/provider-facts.md b/docs/research/provider-facts.md index 898b991..eecd401 100644 --- a/docs/research/provider-facts.md +++ b/docs/research/provider-facts.md @@ -20,18 +20,18 @@ Sources read: OpenAPI spec `https://docs.digitalocean.com/reference/api/referenc |---|---|---|---|---| | DO1 | Bearer auth; custom scopes `droplet:read`, `load_balancer:read`, `monitoring:read` exist | confirmed | "View Droplets" / "View load balancers" / "View Monitoring metrics and alert policies" (scope descriptions). Bearer: "including one in a bearer-type `Authorization` header with your request." | https://docs.digitalocean.com/reference/api/scopes/ , https://docs.digitalocean.com/reference/api/create-personal-access-token/ | | DO2 | Tokens can expire | confirmed | "After the interval passes, the token can no longer authenticate you to the API and it disappears from your account." | https://docs.digitalocean.com/reference/api/create-personal-access-token/ | -| DO3 | 401 means expired or revoked, 403 means missing scope | unverified | The monitoring operations in the OpenAPI spec document 401, 429, 500 and default only. No 403 response is declared for the metrics endpoints. Only a live test with an under-scoped token settles it. | OpenAPI spec, `/v2/monitoring/metrics/droplet/cpu` | +| DO3 | 401 means expired or revoked, 403 means missing scope | partly checked | The monitoring operations in the OpenAPI spec document 401, 429, 500 and default only. No 403 response is declared for the metrics endpoints. Only a live test with an under-scoped token settles it. Live 2026-11-15 (#16): a malformed token on `/v2/monitoring/metrics/droplet/cpu` returns 401 with `"id": "Unauthorized"`. Expired and under-scoped tokens are not yet tested. | OpenAPI spec, `/v2/monitoring/metrics/droplet/cpu` | | DO4 | Droplet metrics are one GET per metric under `/v2/monitoring/metrics/droplet/` with `host_id`, `start`, `end`; `bandwidth` also needs `interface` and `direction` | confirmed | Paths present: `bandwidth`, `cpu`, `filesystem_free`, `filesystem_size`, `load_1`, `load_5`, `load_15`, `memory_cached`, `memory_free`, `memory_total`, `memory_available`. `bandwidth` parameters: `interface` (private, public), `direction` (inbound, outbound). `start` and `end` are required. Note the spec's example call uses `host_id`; the shared parameter component is `parameters_droplet_id`. | OpenAPI spec | | DO5 | There is no Droplet packet-count or disk-I/O metric in the API | new finding | No path exists for disk read/write or packets. The monitoring features page says disk I/O is shown by default in the control panel, but the OpenAPI spec exposes no endpoint for it. Catalog therefore has CPU, bandwidth, and agent metrics only. | OpenAPI spec path list; features page below | | DO6 | Bandwidth unit | confirmed (new detail) | "The metrics in the response body are in megabits per second (Mbps)." | OpenAPI spec, `monitoring_get_dropletBandwidthMetrics` | -| DO7 | Responses are Prometheus-style matrices with string values | confirmed | Example: `"resultType": "matrix"` with `"values": [[1635386880, "122901.18"], ...]`. CPU series carry a `mode` label (idle, iowait, irq, nice, softirq, steal, ...) and the example values grow over time, which looks like cumulative seconds. The spec does not say so. | OpenAPI spec, example `droplet_cpu` | -| DO8 | No step, sample interval or retention is documented | confirmed | `start` and `end` are the only time parameters. No step parameter, resolution or retention text appears in the OpenAPI spec, the features page, the limits page or the monitoring overview page (all read). Doc example timestamps are 120 s apart (1635386880, 1635387000, 1635387120) but that is an example, not a statement. | OpenAPI spec; https://docs.digitalocean.com/products/monitoring/details/features/ ; https://docs.digitalocean.com/products/monitoring/details/limits/ ; https://docs.digitalocean.com/products/monitoring/ | -| DO9 | Memory, load and filesystem metrics need the metrics agent | confirmed | "If you install the DigitalOcean metrics agent, you also get load averages, memory usage, and disk usage." Default metrics: "By default, Droplet metrics show CPU usage, public and private bandwidth usage, and disk I/O." | https://docs.digitalocean.com/products/monitoring/details/features/ | +| DO7 | Responses are Prometheus-style matrices with string values | confirmed live | Example: `"resultType": "matrix"` with `"values": [[1635386880, "122901.18"], ...]`. CPU series carry a `mode` label (idle, iowait, irq, nice, softirq, steal, ...) and the example values grow over time, which looks like cumulative seconds. The spec does not say so. Live 2026-11-15 (#16): on the two Droplets with the agent, all eight `mode` series (idle, iowait, irq, nice, softirq, steal, system, user) never decreased over one hour, so `cpu` is cumulative. Bandwidth values rise and fall: they are rates. | OpenAPI spec, example `droplet_cpu` | +| DO8 | No step, sample interval or retention is documented | measured live | `start` and `end` are the only time parameters. No step parameter, resolution or retention text appears in the OpenAPI spec, the features page, the limits page or the monitoring overview page (all read). Doc example timestamps are 120 s apart (1635386880, 1635387000, 1635387120) but that is an example, not a statement. Live 2026-11-15 (#16): over a one-hour window, samples were 120 s apart and the newest was 9 s old. Longer windows are downsampled to at most 401 points: 216 s apart for one day, 1,512 s for seven days. Seven days of history were returned. | OpenAPI spec; https://docs.digitalocean.com/products/monitoring/details/features/ ; https://docs.digitalocean.com/products/monitoring/details/limits/ ; https://docs.digitalocean.com/products/monitoring/ | +| DO9 | Memory, load, filesystem and `cpu` metrics need the metrics agent | **corrected** | "If you install the DigitalOcean metrics agent, you also get load averages, memory usage, and disk usage." Default metrics: "By default, Droplet metrics show CPU usage, public and private bandwidth usage, and disk I/O." Live 2026-11-15 (#16): `cpu` also needs the agent, although the features page lists CPU among the default metrics; that is the control panel graph. On 3 of 5 Droplets, the three without `monitoring` in `features`, `cpu` and every memory and load path returned no series. Bandwidth returned data on all five. | https://docs.digitalocean.com/products/monitoring/details/features/ | | DO10 | Rate limits 5,000 per hour and 250 per minute per token | confirmed | "5,000 requests per hour", "250 requests per minute (5% of the hourly total)". Header text: "Requests through the API are rate limited per OAuth token." | OpenAPI spec, introduction "Rate Limit" | -| DO11 | Rate limit headers `ratelimit-limit`, `ratelimit-remaining`, `ratelimit-reset`, and `retry-after` on 429 | confirmed with a refinement | Headers are declared on every metrics 200 response. `ratelimit-reset` is "The time when the oldest request will expire" as a Unix timestamp, not a window reset. "More rate limiting information is returned only within burst limit error response headers: **retry-after**". The hourly counter is a rolling per-request timer, not a fixed window. | OpenAPI spec, components headers and introduction | -| DO12 | `per_page` maximum: parameter text says 100, introduction says 200 | **corrected** | The list parameters for `/v2/droplets` and `/v2/load_balancers` both use the shared `parameters_per_page` component: `"maximum": 200`, `"default": 20`. Introduction: "The maximum number of results per page is 200." The description text of that parameter is "Number of items returned per page" (no 100 cap). A different component named `per_page` (max 100) exists but is used by other endpoints, not these two. The plan's "parameter description caps at 100" no longer holds for these endpoints. Using 100 remains safe. Live test should confirm that 200 is accepted. | OpenAPI spec, `/v2/droplets` and `/v2/load_balancers` parameter refs | -| DO13 | Pagination follows `links.pages.next` | confirmed | Introduction describes the `links.pages` object with keys `first`, `prev`, `next`, `last`. Default 20 per page; links object only returned when more than 20 items. | OpenAPI spec, "Links & Pagination" | -| DO14 | Load balancer metrics are one GET per metric with `lb_id`, `start`, `end` | new detail | Paths under `/v2/monitoring/metrics/load_balancer/` take `lb_id` as a query parameter (`parameters_load_balancer_id`) plus `start` and `end`. 27 LB metric paths exist (frontend_* and droplets_*). | OpenAPI spec | +| DO11 | Rate limit headers `ratelimit-limit`, `ratelimit-remaining`, `ratelimit-reset`, and `retry-after` on 429 | confirmed with a refinement | Headers are declared on every metrics 200 response. `ratelimit-reset` is "The time when the oldest request will expire" as a Unix timestamp, not a window reset. "More rate limiting information is returned only within burst limit error response headers: **retry-after**". The hourly counter is a rolling per-request timer, not a fixed window. Live 2026-11-15 (#16): `ratelimit-limit` was 5000 and `ratelimit-reset` a Unix time in seconds on a list response. No 429 was provoked. | OpenAPI spec, components headers and introduction | +| DO12 | `per_page` maximum: parameter text says 100, introduction says 200 | **corrected** | The list parameters for `/v2/droplets` and `/v2/load_balancers` both use the shared `parameters_per_page` component: `"maximum": 200`, `"default": 20`. Introduction: "The maximum number of results per page is 200." The description text of that parameter is "Number of items returned per page" (no 100 cap). A different component named `per_page` (max 100) exists but is used by other endpoints, not these two. The plan's "parameter description caps at 100" no longer holds for these endpoints. Using 100 remains safe. Live test should confirm that 200 is accepted. Live 2026-11-15 (#16): `per_page=200` on `/v2/droplets` returned 200 OK. The account has 5 Droplets, so a full page of 200 was not exercised. | OpenAPI spec, `/v2/droplets` and `/v2/load_balancers` parameter refs | +| DO13 | Pagination follows `links.pages.next` | confirmed | Introduction describes the `links.pages` object with keys `first`, `prev`, `next`, `last`. Default 20 per page; links object only returned when more than 20 items. Live 2026-11-15 (#16): not exercised: 5 Droplets fit one page and no `links.pages` keys came back. | OpenAPI spec, "Links & Pagination" | +| DO14 | Load balancer metrics are one GET per metric with `lb_id`, `start`, `end` | new detail | Paths under `/v2/monitoring/metrics/load_balancer/` take `lb_id` as a query parameter (`parameters_load_balancer_id`) plus `start` and `end`. 27 LB metric paths exist (frontend_* and droplets_*). Live 2026-11-15 (#16): not checked: the test account has no load balancers. | OpenAPI spec | Doc pages that returned 404 or had nothing: `https://docs.digitalocean.com/products/monitoring/how-to/view-metrics/` (404), `https://docs.digitalocean.com/products/droplets/how-to/view-metrics/` (404). The load balancer features page has no metrics text. @@ -115,7 +115,9 @@ Doc pages that returned 404 or had nothing: `https://docs.digitalocean.com/produ ## Live checks -These need a test account with the least-privilege credentials the plan names. Each result goes on its issue with request and response excerpts, secrets removed. Nothing here has been run. +These need a test account with the least-privilege credentials the plan names. Each result goes on its issue with request and response excerpts, secrets removed. + +The first DigitalOcean run, on 2026-11-15, used read-only requests against an account with 5 Droplets, 2 of them with the metrics agent, and no load balancers. Its results are in DO3, DO7, DO8, DO9 and DO11 to DO14 above. From a home connection, 24 requests had a median round trip of 384 ms (301 to 799 ms); a poller in a data center will differ. Still open: expired and under-scoped tokens, load balancer metrics, and paging past one page. | Issue | Check | Settles | |---|---|---| diff --git a/lib/DigitalOceanCatalog.php b/lib/DigitalOceanCatalog.php index a85c872..85eb3cc 100644 --- a/lib/DigitalOceanCatalog.php +++ b/lib/DigitalOceanCatalog.php @@ -26,8 +26,9 @@ * the live checks on #16 record them. * * Conversions: - * - cpu: CPU seconds per mode, read as cumulative (inferred from the API - * example, unconfirmed): percent busy between the two newest samples. + * - cpu: CPU seconds per mode, cumulative (confirmed live on #16): percent + * busy between the two newest samples. It needs the metrics agent: on a + * Droplet without it the API returns no series, so it is not a default. * - mbps: megabits per second, as the API states, to bits per second. * - value: the newest value as it is. * - single: the newest value as it is. Load balancer label sets are @@ -48,7 +49,7 @@ final class DigitalOceanCatalog { * @var array, 3: string, 4: bool}> */ private const METRICS = [ - 'do_cpu_pct' => [self::DROPLET, 'cpu', [], 'cpu', false], + 'do_cpu_pct' => [self::DROPLET, 'cpu', [], 'cpu', true], 'do_bw_pub_in' => [self::DROPLET, 'bandwidth', ['interface' => 'public', 'direction' => 'inbound'], 'mbps', false], 'do_bw_pub_out' => [ self::DROPLET, 'bandwidth', ['interface' => 'public', 'direction' => 'outbound'], 'mbps', false, diff --git a/tests/Unit/DigitalOceanDriverTest.php b/tests/Unit/DigitalOceanDriverTest.php index b280c2e..ba0007b 100644 --- a/tests/Unit/DigitalOceanDriverTest.php +++ b/tests/Unit/DigitalOceanDriverTest.php @@ -372,7 +372,7 @@ function cloud_do_metric(string $metric, string $providerId = '222651441', int $ it('lists only metrics that need no agent by default', function () { expect(DigitalOceanCatalog::defaults('droplet')) - ->toBe(['do_cpu_pct', 'do_bw_pub_in', 'do_bw_pub_out', 'do_bw_prv_in', 'do_bw_prv_out']) + ->toBe(['do_bw_pub_in', 'do_bw_pub_out', 'do_bw_prv_in', 'do_bw_prv_out']) ->and(count(DigitalOceanCatalog::defaults('load_balancer')))->toBe(16); foreach ( @@ -395,8 +395,8 @@ function cloud_do_metric(string $metric, string $providerId = '222651441', int $ 300 ); - expect($estimate->requestsPerCollection)->toBe(5) - ->and($estimate->requestsPerMonth)->toBe(5 * 8640) + expect($estimate->requestsPerCollection)->toBe(4) + ->and($estimate->requestsPerMonth)->toBe(4 * 8640) ->and($estimate->monthlyCost)->toBe(0.0); });