Welcome to mirror list, hosted at ThFree Co, Russian Federation.

metrics_spec.rb « trace « ci « gitlab « lib « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 6518d0ab075443c70aba3e7af936b7410908c324 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# frozen_string_literal: true

require 'spec_helper'

RSpec.describe Gitlab::Ci::Trace::Metrics, :prometheus do
  describe '#increment_trace_bytes' do
    context 'when incrementing by more than one' do
      it 'increments a single counter' do
        subject.increment_trace_bytes(10)
        subject.increment_trace_bytes(20)
        subject.increment_trace_bytes(30)

        expect(described_class.trace_bytes.get).to eq 60
        expect(described_class.trace_bytes.values.count).to eq 1
      end
    end
  end
end