Skip to content

Commit

Permalink
Need to actually create the service properly.
Browse files Browse the repository at this point in the history
  • Loading branch information
relistan committed May 9, 2015
1 parent f2113e2 commit 626f40b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
9 changes: 8 additions & 1 deletion lib/centurion/deploy_dsl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,14 @@ def defined_restart_policy
private

def service_under_construction
service = fetch(:service, Centurion::Service.new(fetch(:project)))
service = fetch(:service,
Centurion::Service.from_hash(
fetch(:project),
image: fetch(:image),
hostname: fetch(:container_hostname),
dns: fetch(:custom_dns)
)
)
set(:service, service)
end

Expand Down
3 changes: 2 additions & 1 deletion spec/service_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
port_bindings: [ { host_port: 12340, container_port: 80, type: 'tcp' } ]
)

expect(svc.name). to eq('mycontainer')
expect(svc.name).to eq('mycontainer')
expect(svc.image).to eq(image)
expect(svc.hostname).to eq(hostname)
expect(svc.dns).to be_nil
expect(svc.volumes.size).to eq(1)
Expand Down

0 comments on commit 626f40b

Please sign in to comment.