Sha256: b27aff02ee9505507cfebad28e77e162c0a63a7ab5a230b18ee2a64be37406c5
Contents?: true
Size: 1.29 KB
Versions: 4
Compression:
Stored size: 1.29 KB
Contents
require "spec_helper" require "gitlab_monitor" # rubocop:disable Metrics/LineLength describe GitLab::Monitor::GitProcessProber do describe ".extract_subcommand" do it "extract git subcommand" do command_subcommands = { "git upload-pack --stateless-rpc --advertise-refs /repositories/Hey/project.git" => "upload-pack", "git --git-dir=/repositories/null/gitlab-ce.git fetch upstream --tags" => "fetch", "git --shallow-file pack-objects --revs --thin --stdout --shallow --delta-base-offset" => "pack-objects", "git /repositories/some/thing.git pack-objects" => "pack-objects", "git --git-dir=/repositories/Fact/arti.git cat-file blob 13b39ff4503badb8182b901c471039d6ab6ab96b" => "cat-file", "git --git-dir /repositories/Fact/arti.git cat-file blob 13b39ff4503badb8182b901c471039d6ab6ab96b" => "cat-file", "git --git-dir=/repositories/an/web.git gc" => "gc", "git --git-dir=/repositories/an/web.git gc" => "gc", "git --git-dir /repositories/an/web.git gc" => "gc", "git --git-dir /repositories/an/web.git" => nil } command_subcommands.each do |command, subcommand| cmdline = command.tr(" ", "\u0000") expect(described_class.extract_subcommand(cmdline)).to eq(subcommand) end end end end
Version data entries
4 entries across 4 versions & 1 rubygems