Skip to content

Commit

Permalink
Fix Test
Browse files Browse the repository at this point in the history
  • Loading branch information
pramodbindal committed Sep 19, 2024
1 parent 73a5283 commit b802e66
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion pkg/pipelinerunmetrics/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,6 @@ func (r *Recorder) RunningPipelineRuns(lister listers.PipelineRunLister) error {
mutators := []tag.Mutator{
tag.Insert(namespaceTag, pr.Namespace),
tag.Insert(pipelineTag, pipelineName),
//tag.Insert(pipelinerunTag, pr.Name),
}
if r.cfg != nil && r.cfg.RunningPipelinerunLevel == "pipelinerun" {
pipelineRunKey = pipelineRunKey + "#" + pr.Name
Expand Down
4 changes: 2 additions & 2 deletions pkg/pipelinerunmetrics/metrics_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,7 @@ func TestRecordRunningPipelineRunsCount(t *testing.T) {
// Add N randomly-named PipelineRuns with differently-succeeded statuses.
for _, tr := range []*v1.PipelineRun{
newPipelineRun(corev1.ConditionTrue, ""),
newPipelineRun(corev1.ConditionUnknown, "test-x"),
newPipelineRun(corev1.ConditionUnknown, "test"),
newPipelineRun(corev1.ConditionFalse, ""),
} {
if err := informer.Informer().GetIndexer().Add(tr); err != nil {
Expand All @@ -502,7 +502,7 @@ func TestRecordRunningPipelineRunsCount(t *testing.T) {
t.Errorf("RunningPipelineRuns: %v", err)
}
metricstest.CheckLastValueData(t, "running_pipelineruns_count", map[string]string{}, 1)
metricstest.CheckLastValueData(t, "running_pipelineruns", map[string]string{"pipeline": "anonymous", "namespace": "test-x"}, 1)
metricstest.CheckLastValueData(t, "running_pipelineruns", map[string]string{"pipeline": "anonymous", "namespace": "test"}, 1)
}

func TestRecordRunningPipelineRunsResolutionWaitCounts(t *testing.T) {
Expand Down

0 comments on commit b802e66

Please sign in to comment.