Skip to content

Commit

Permalink
Fix spec for platforms with docker 1.7
Browse files Browse the repository at this point in the history
Docker 1.7 moved the configuration from ~/.dockercfg to
~/.docker/config.json and this is now the version available on CentOS 7.
This change checks the docker version rather than the operating system
so that the check is not bound to the platform.
  • Loading branch information
hunner committed Aug 21, 2015
1 parent a6cdbf6 commit 13fd97e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion spec/acceptance/docker_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ class { 'docker':
registry_port = 5000
@registry_address = "#{registry_host}:#{registry_port}"
@registry_email = '[email protected]'
@config_file = fact('osfamily') == 'RedHat' ? '~/.dockercfg' : '~/.docker/config.json'
@config_file = shell('docker --version|cut -d"/" -f2') > "1.7" ? '~/.dockercfg' : '~/.docker/config.json'
@manifest = <<-EOS
class { 'docker': }
docker::run { 'registry':
Expand Down

0 comments on commit 13fd97e

Please sign in to comment.