~bkerensa/ubuntu/raring/puppet/new-upstream-release

« back to all changes in this revision

Viewing changes to test/ral/type/file/target.rb

  • Committer: Bazaar Package Importer
  • Author(s): Chuck Short
  • Date: 2011-07-25 01:00:37 UTC
  • mfrom: (1.1.24 upstream) (3.1.25 sid)
  • Revision ID: james.westby@ubuntu.com-20110725010037-875vuxs10eboqgw3
Tags: 2.7.1-1ubuntu1
* Merge from debian unstable.  Remaining changes:
  - debian/puppetmaster-passenger.postinst: Use cacrl instead of hostcrl to
    set the location of the CRL in apache2 configuration. Fix apache2
    configuration on upgrade as well (LP: #641001)
  - move all puppet dependencies to puppet-common since all the code
    actually located in puppet-common.
  - move libagueas from a recommend to a dependency.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/usr/bin/env ruby
2
2
 
3
 
require File.dirname(__FILE__) + '/../../../lib/puppettest'
 
3
require File.expand_path(File.dirname(__FILE__) + '/../../../lib/puppettest')
4
4
 
5
5
require 'puppettest'
6
6
require 'puppettest/support/utils'
24
24
 
25
25
    file = nil
26
26
    assert_nothing_raised {
27
 
 
28
 
            file = Puppet::Type.type(:file).new(
29
 
                
 
27
      file = Puppet::Type.type(:file).new(
30
28
        :title => "somethingelse",
31
29
        :ensure => path,
32
 
        
33
30
        :path => link
34
31
      )
35
32
    }
102
99
 
103
100
    link = nil
104
101
    assert_nothing_raised {
105
 
 
106
 
            link = Puppet::Type.type(:file).new(
107
 
                
 
102
      link = Puppet::Type.type(:file).new(
108
103
        :ensure => source,
109
104
        :path => dest,
110
 
        
111
105
        :recurse => true
112
106
      )
113
107
    }
140
134
 
141
135
    link = nil
142
136
    assert_nothing_raised {
143
 
 
144
 
            link = Puppet::Type.type(:file).new(
145
 
                
 
137
      link = Puppet::Type.type(:file).new(
146
138
        :path => dest,
147
 
        
148
139
        :ensure => "source"
149
140
      )
150
141
    }
161
152
 
162
153
    resources = []
163
154
 
164
 
          resources << Puppet::Type.type(:exec).new(
165
 
                
 
155
    resources << Puppet::Type.type(:exec).new(
166
156
      :command => "mkdir #{source}; touch #{source}/file",
167
157
      :title => "yay",
168
 
        
169
158
      :path => ENV["PATH"]
170
159
    )
171
160
 
172
 
          resources << Puppet::Type.type(:file).new(
173
 
                
 
161
    resources << Puppet::Type.type(:file).new(
174
162
      :ensure => source,
175
163
      :path => dest,
176
164
      :recurse => true,
177
 
        
178
165
      :require => resources[0]
179
166
    )
180
167