This test is a baseline for following tests, that remove or replace a registry. It shows output for metrics from setupTestMetrics before doing any modifications.
(t *testing.T)
| 828 | // This test is a baseline for following tests, that remove or replace a registry. |
| 829 | // It shows output for metrics from setupTestMetrics before doing any modifications. |
| 830 | func TestTenantRegistries_RemoveBaseline(t *testing.T) { |
| 831 | mainRegistry := prometheus.NewPedanticRegistry() |
| 832 | mainRegistry.MustRegister(setupTestMetrics()) |
| 833 | |
| 834 | require.NoError(t, testutil.GatherAndCompare(mainRegistry, bytes.NewBufferString(` |
| 835 | # HELP counter help |
| 836 | # TYPE counter counter |
| 837 | counter 75 |
| 838 | |
| 839 | # HELP counter_labels help |
| 840 | # TYPE counter_labels counter |
| 841 | counter_labels{label_one="a"} 75 |
| 842 | |
| 843 | # HELP counter_user help |
| 844 | # TYPE counter_user counter |
| 845 | counter_user{user="1"} 5 |
| 846 | counter_user{user="2"} 10 |
| 847 | counter_user{user="3"} 15 |
| 848 | counter_user{user="4"} 20 |
| 849 | counter_user{user="5"} 25 |
| 850 | |
| 851 | # HELP gauge help |
| 852 | # TYPE gauge gauge |
| 853 | gauge 75 |
| 854 | |
| 855 | # HELP gauge_labels help |
| 856 | # TYPE gauge_labels gauge |
| 857 | gauge_labels{label_one="a"} 75 |
| 858 | |
| 859 | # HELP gauge_user help |
| 860 | # TYPE gauge_user gauge |
| 861 | gauge_user{user="1"} 5 |
| 862 | gauge_user{user="2"} 10 |
| 863 | gauge_user{user="3"} 15 |
| 864 | gauge_user{user="4"} 20 |
| 865 | gauge_user{user="5"} 25 |
| 866 | |
| 867 | # HELP histogram help |
| 868 | # TYPE histogram histogram |
| 869 | histogram_bucket{le="1"} 5 |
| 870 | histogram_bucket{le="3"} 15 |
| 871 | histogram_bucket{le="5"} 25 |
| 872 | histogram_bucket{le="+Inf"} 25 |
| 873 | histogram_sum 75 |
| 874 | histogram_count 25 |
| 875 | |
| 876 | # HELP histogram_labels help |
| 877 | # TYPE histogram_labels histogram |
| 878 | histogram_labels_bucket{label_one="a",le="1"} 5 |
| 879 | histogram_labels_bucket{label_one="a",le="3"} 15 |
| 880 | histogram_labels_bucket{label_one="a",le="5"} 25 |
| 881 | histogram_labels_bucket{label_one="a",le="+Inf"} 25 |
| 882 | histogram_labels_sum{label_one="a"} 75 |
| 883 | histogram_labels_count{label_one="a"} 25 |
| 884 | |
| 885 | # HELP summary help |
| 886 | # TYPE summary summary |
| 887 | summary_sum 75 |
nothing calls this directly
no test coverage detected