Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐞 Director correctly places runtime config jobs... #2475

Merged
merged 1 commit into from
Nov 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ def initialize(name_alias, name, os, version)
@os = os
@version = version
@manager = Api::StemcellManager.new
if @os.blank?
models = @manager.all_by_name_and_version(@name, @version)
unless models.empty?
@os = models.first.operating_system
end
end
end

def is_using_os?
Expand Down
7 changes: 7 additions & 0 deletions src/bosh-director/spec/unit/deployment_plan/stemcell_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,13 @@ def make_stemcell(name, version, os = 'os1', params = {})
valid_spec['name'] = 'stemcell-name'
expect { make(valid_spec) }.to_not raise_error
end
it 'populates os' do
make_stemcell('stemcell-name','0.5.2','plan-9')
valid_spec.delete('os')
valid_spec['name'] = 'stemcell-name'
stemcell = make(valid_spec)
expect(stemcell.os).to eq('plan-9')
end
end

context 'when neither os or name are specified' do
Expand Down