Skip to content

Commit ef4c07d

Browse files
committed
add comments
1 parent 2a4ae47 commit ef4c07d

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

coderd/prometheusmetrics/prometheusmetrics_test.go

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -522,16 +522,24 @@ func TestExperimentsMetric(t *testing.T) {
522522
}{
523523
{
524524
name: "Enabled experiment is exported in metrics",
525-
experiments: codersdk.Experiments{codersdk.ExperimentExample},
525+
experiments: codersdk.Experiments{
526+
// TODO: We need to use a real experiment from codersdk.ExperimentsAll
527+
// when the slice is not empty. Uncomment when that happens.
528+
// codersdk.ExperimentSharedPorts,
529+
},
526530
expected: map[codersdk.Experiment]float64{
527-
codersdk.ExperimentExample: 1,
531+
// TODO: We need to use a real experiment from codersdk.ExperimentsAll
532+
// when the slice is not empty. Uncomment when that happens.
533+
// codersdk.ExperimentSharedPorts: 1,
528534
},
529535
},
530536
{
531537
name: "Disabled experiment is exported in metrics",
532538
experiments: codersdk.Experiments{},
533-
expected: map[codersdk.Experiment]float64{
534-
codersdk.ExperimentExample: 0,
539+
expected: map[codersdk.Experiment]float64{
540+
// TODO: We need to use a real experiment from codersdk.ExperimentsAll
541+
// when the slice is not empty. Uncomment when that happens.
542+
// codersdk.ExperimentSharedPorts: 0,
535543
},
536544
},
537545
{
@@ -553,6 +561,7 @@ func TestExperimentsMetric(t *testing.T) {
553561
out, err := reg.Gather()
554562
require.NoError(t, err)
555563
require.Lenf(t, out, 1, "unexpected number of registered metrics")
564+
556565
seen := make(map[codersdk.Experiment]float64)
557566

558567
for _, metric := range out[0].GetMetric() {

0 commit comments

Comments
 (0)