Sha256: 9f9c7e478c6a210ba55479b3830eaf48c786414b9f18e000f7e92dc315180152
Contents?: true
Size: 656 Bytes
Versions: 31
Compression:
Stored size: 656 Bytes
Contents
require 'kontena/cli/stacks/yaml/validator_v3' require 'kontena/cli/stacks/yaml/custom_validators/affinities_validator' describe Kontena::Cli::Stacks::YAML::Validations::CustomValidators::AffinitiesValidator do let(:errors) { Hash.new } it 'accepts valid affinity' do subject.validate('affinity', ['foo==bar'], [], errors) expect(errors.size).to eq(0) end it 'accepts valid soft affinity' do subject.validate('affinity', ['foo==~bar'], [], errors) expect(errors.size).to eq(0) end it 'does not accept invalid affinity' do subject.validate('affinity', ['foo=bar'], [], errors) expect(errors.size).to eq(1) end end
Version data entries
31 entries across 31 versions & 1 rubygems