The gpu boolean field is unused and lacks expressiveness. It does not account for: * The number of GPUs attached to a VM * The specific type of GPU attached This change removes the field in favor of more precise mechanisms for representing GPU configurations.
23 lines
652 B
Ruby
23 lines
652 B
Ruby
# frozen_string_literal: true
|
|
|
|
require "rspec"
|
|
require_relative "../../lib/option"
|
|
|
|
RSpec.describe Option do
|
|
describe "#VmSize options" do
|
|
it "no burstable cpu allowed for Standard VMs" do
|
|
expect(Option::VmSizes.map { it.name.include?("burstable-") == (it.cpu_burst_percent_limit > 0) }.all?(true)).to be true
|
|
end
|
|
|
|
it "no odd number of vcpus allowed, except for 1" do
|
|
expect(Option::VmSizes.all? { it.vcpus == 1 || it.vcpus.even? }).to be true
|
|
end
|
|
end
|
|
|
|
describe "#VmFamily options" do
|
|
it "families include burstables" do
|
|
expect(described_class.families.map(&:name)).to include("burstable")
|
|
end
|
|
end
|
|
end
|