Files
ubicloud/spec/prog/setup_sysstat_spec.rb
Hadi Moshayedi 22cf0a075e Install Sysstat.
Having access to historical performance counters will be useful when we
encounter performance issues. This PR creates a program to install
sysstat on VmHosts to enable that.

After this, sysstat will collect a performance counter samples every
minute, which can be analyzed using the sar command:

```
$ sar -f /var/log/sysstat/sa[date] [options]
```
2023-11-10 12:54:43 -08:00

19 lines
502 B
Ruby

# frozen_string_literal: true
require_relative "../model/spec_helper"
RSpec.describe Prog::SetupSysstat do
subject(:ss) {
described_class.new(Strand.new(prog: "SetupSysstat"))
}
describe "#start" do
it "Sets it up and pops" do
sshable = instance_double(Sshable)
expect(sshable).to receive(:cmd).with("sudo host/bin/setup-sysstat")
expect(ss).to receive(:sshable).and_return(sshable)
expect { ss.start }.to exit({"msg" => "Sysstat was setup"})
end
end
end