Files
ubicloud/spec/prog/learn_os_spec.rb
Hadi Moshayedi 6335abaa07 Save OS version for VmHost
This will be used for installing the proper SPDK version, and also for
deciding if certain cgroup features are supported.
2024-11-21 11:50:30 -08:00

18 lines
496 B
Ruby

# frozen_string_literal: true
require_relative "../model/spec_helper"
RSpec.describe Prog::LearnOs do
subject(:lo) { described_class.new(Strand.new) }
let(:sshable) { instance_double(Sshable) }
describe "#start" do
it "exits, saving OS version" do
expect(sshable).to receive(:cmd).with("lsb_release --short --release").and_return("22.04")
allow(lo).to receive(:sshable).and_return(sshable)
expect { lo.start }.to exit(os_version: "ubuntu-22.04")
end
end
end