Sha256: 0866565451a3c360616f1ce7deca7e60904f13ee1a37e32a40de8c03e163780f

Contents?: true

Size: 989 Bytes

Versions: 12

Compression:

Stored size: 989 Bytes

Contents

require File.expand_path(__FILE__).sub(%r(/test/.*), '/test/test_helper.rb')
require File.expand_path(__FILE__).sub(%r(.*/test/), '').sub(/test_(.*)\.rb/,'\1')

class TestSync < Test::Unit::TestCase
  def test_sync
    TmpFile.with_path do |tmpdir|
      tmpdir = Scout.tmp.tmpdir_sync
      tmpdir.dir1.foo.write("FOO")
      tmpdir.dir1.bar.write("BAR")

      TmpFile.with_path do |tmpdir2|
        Misc.in_dir tmpdir2 do
          SSHLine.sync([tmpdir.dir1], map: :current)

          assert tmpdir2.glob("**/*").select{|f| f.include?('foo') }.any?
        end
      end
    end
  end

  def test_sync_dir_map
    TmpFile.with_path do |tmpdir|
      tmpdir = Scout.tmp.tmpdir_sync
      tmpdir.dir1.foo.write("FOO")
      tmpdir.dir1.bar.write("BAR")

      TmpFile.with_path do |tmpdir2|
        SSHLine.sync([tmpdir.dir1], map: tmpdir2)
        Misc.in_dir tmpdir2 do
          assert tmpdir2.glob("**/*").select{|f| f.include?('foo') }.any?
        end
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
scout-gear-10.7.3 test/scout/offsite/test_sync.rb
scout-gear-10.7.2 test/scout/offsite/test_sync.rb
scout-gear-10.7.1 test/scout/offsite/test_sync.rb
scout-gear-10.7.0 test/scout/offsite/test_sync.rb
scout-gear-10.4.0 test/scout/offsite/test_sync.rb
scout-gear-10.3.0 test/scout/offsite/test_sync.rb
scout-gear-10.2.0 test/scout/offsite/test_sync.rb
scout-gear-10.1.0 test/scout/offsite/test_sync.rb
scout-gear-10.0.1 test/scout/offsite/test_sync.rb
scout-gear-9.1.0 test/scout/offsite/test_sync.rb
scout-gear-9.0.0 test/scout/offsite/test_sync.rb
scout-gear-8.1.0 test/scout/offsite/test_sync.rb