diff --git a/integration/test_metric.html b/integration/test_metric.html index c565d9aa8..e6d887d08 100644 --- a/integration/test_metric.html +++ b/integration/test_metric.html @@ -90,6 +90,32 @@
+def test_metric_longhorn_backup(set_random_backupstore, client, core_api, batch_v1_api, volume_name)
+
Scenario: test metric longhorn_backup_actual_size_bytes and +longhorn_backup_state
+Issue: https://github.com/longhorn/longhorn/issues/9429
+Given a volume
+When a backup is created by user +Then has a metric longhorn_backup_actual_size_bytes value +equals to the size of the backup, +and volume label is the volume name +and recurring_job label is empty +And has a metric longhorn_backup_state value equals to 3 (Completed), +and volume label is the volume name +and recurring_job label is empty
+When a recurring backup job is created +Then should have a metric longhorn_backup_actual_size_bytes value +equals to the size of the backup, +and volume label is the volume name +and recurring_job label is the job name +And should have a metric longhorn_backup_state +value equals to 3 (Completed), +and volume label is the volume name +and recurring_job label is the job name
def test_metric_longhorn_snapshot_actual_size_bytes(client, core_api, volume_name)
Given a volume
When 1 snapshot is created by user And 1 snapshot is created by system -Then has a metric longhorn_snapshot_actual_size_bytes value equals to the -size of the user created snapshot, +Then has a metric longhorn_snapshot_actual_size_bytes value +equals to the size of the user created snapshot, and volume label is the volume name and user_created label is true -And has a metric longhorn_snapshot_actual_size_bytes value equals to the -size of the system created snapshot, +And has a metric longhorn_snapshot_actual_size_bytes value +equals to the size of the system created snapshot, and volume label is the volume name and user_created label is false
When 3 snapshot is created by user @@ -159,6 +185,12 @@
+def wait_for_metric_sum_on_all_nodes(client, core_api, metric_name, metric_labels, expected_value)
+
def wait_for_metric_volume_actual_size(client, core_api, metric_name, metric_labels, volume_name)
find_metric
find_metrics
get_metrics
test_metric_longhorn_backup
test_metric_longhorn_snapshot_actual_size_bytes
test_metric_longhorn_volume_file_system_read_only
test_node_metrics
test_volume_metrics
wait_for_metric
wait_for_metric_count_all_nodes
wait_for_metric_sum_on_all_nodes
wait_for_metric_volume_actual_size