test/extra/deployers/test_fog.rb in nanoc-3.7.5 vs test/extra/deployers/test_fog.rb in nanoc-3.8.0
- old
+ new
@@ -59,9 +59,41 @@
::Fog.instance_eval { @mocking = false }
end
end
end
+ def test_run_cdn_with_dry_run
+ if_have 'fog' do
+ begin
+ # Create deployer
+ fog = Nanoc::Extra::Deployers::Fog.new(
+ 'output/',
+ {
+ :provider => 'aws',
+ :cdn_id => 'id-cdn',
+ # FIXME bucket is necessary for deployer but fog doesn't like it
+ :bucket_name => 'doesntmatter',
+ :aws_access_key_id => 'meh',
+ :aws_secret_access_key => 'dontcare'},
+ :dry_run => true)
+
+ # Create site
+ FileUtils.mkdir_p('output')
+ File.open('output/meow', 'w') { |io| io.write "I am a cat!" }
+ File.open('output/bark', 'w') { |io| io.write "I am a dog!" }
+
+ # Create local cloud (but not bucket)
+ FileUtils.mkdir_p('mylocalcloud')
+
+ # Run
+ fog.run
+ ensure
+ # Hack :(
+ ::Fog.instance_eval { @mocking = false }
+ end
+ end
+ end
+
def test_run_delete_stray
if_have 'fog' do
# Create deployer
fog = Nanoc::Extra::Deployers::Fog.new(
'output/',