Skip to content

Commit

Permalink
try something else
Browse files Browse the repository at this point in the history
  • Loading branch information
hacdias committed Jun 13, 2023
1 parent fceb810 commit 743e54b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/sharness/t0119-prometheus.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ test_expect_success "collect metrics" '
test_kill_ipfs_daemon

test_expect_success "filter metrics" '
sed -ne "s/^\([a-z0-9_]\+\).*/\1/p" raw_metrics | LC_ALL=C sort > filtered_metrics
sed -ne "s/^\([a-z0-9_]\+\).*/\1/p" raw_metrics | LC_ALL=C sort | uniq > filtered_metrics
'

test_expect_success "make sure metrics haven't changed" '
diff -u ../t0119-prometheus-data/prometheus_metrics (sort < filtered_metrics | uniq)
diff -u ../t0119-prometheus-data/prometheus_metrics filtered_metrics
'

# Check what was added by enabling ResourceMgr.Enabled
Expand All @@ -50,11 +50,11 @@ test_kill_ipfs_daemon

test_expect_success "filter metrics and find ones added by enabling ResourceMgr" '
sed -ne "s/^\([a-z0-9_]\+\).*/\1/p" raw_metrics | LC_ALL=C sort > filtered_metrics &&
grep -v -x -f ../t0119-prometheus-data/prometheus_metrics filtered_metrics > rcmgr_metrics
grep -v -x -f ../t0119-prometheus-data/prometheus_metrics filtered_metrics | LC_ALL=C sort | uniq > rcmgr_metrics
'

test_expect_success "make sure initial metrics added by setting ResourceMgr.Enabled haven't changed" '
diff -u ../t0119-prometheus-data/prometheus_metrics_added_by_enabling_rcmgr (sort < rcmgr_metrics | uniq)
diff -u ../t0119-prometheus-data/prometheus_metrics_added_by_enabling_rcmgr rcmgr_metrics
'

test_done

0 comments on commit 743e54b

Please sign in to comment.