Ejemplo n.º 1
0
def test_fix_local_symlinks(deployment_dir):
    d = Deployment('testing')
    d.package_dir = deployment_dir

    local = os.path.join(deployment_dir, 'local')
    os.makedirs(local)
    target = os.path.join(deployment_dir, 'sometarget')
    symlink = os.path.join(local, 'symlink')
    os.symlink(target, symlink)

    d.fix_local_symlinks()
    eq_(os.readlink(symlink), '../sometarget')
Ejemplo n.º 2
0
def test_fix_local_symlinks_with_relative_links(deployment_dir):
    # Runs shouldn't ruin the already relative symlinks.
    d = Deployment('testing')
    d.package_dir = deployment_dir

    local = os.path.join(deployment_dir, 'local')
    os.makedirs(local)
    symlink = os.path.join(local, 'symlink')
    os.symlink('../target', symlink)

    d.fix_local_symlinks()
    eq_(os.readlink(symlink), '../target')
Ejemplo n.º 3
0
def test_fix_local_symlinks_with_relative_links(deployment_dir):
        # Runs shouldn't ruin the already relative symlinks.
        d = Deployment('testing')
        d.package_dir = deployment_dir

        local = os.path.join(deployment_dir, 'local')
        os.makedirs(local)
        symlink = os.path.join(local, 'symlink')
        os.symlink('../target', symlink)

        d.fix_local_symlinks()
        eq_(os.readlink(symlink), '../target')
Ejemplo n.º 4
0
def test_fix_local_symlinks(deployment_dir):
        d = Deployment('testing')
        d.package_dir = deployment_dir

        local = os.path.join(deployment_dir, 'local')
        os.makedirs(local)
        target = os.path.join(deployment_dir, 'sometarget')
        symlink = os.path.join(local, 'symlink')
        os.symlink(target, symlink)

        d.fix_local_symlinks()
        eq_(os.readlink(symlink), '../sometarget')
Ejemplo n.º 5
0
def test_fix_local_symlinks_with_relative_links(deployment_dir):
    # Runs shouldn't ruin the already relative symlinks.
    d = Deployment("testing")
    d.package_dir = deployment_dir

    local = os.path.join(deployment_dir, "local")
    os.makedirs(local)
    symlink = os.path.join(local, "symlink")
    os.symlink("../target", symlink)

    d.fix_local_symlinks()
    eq_(os.readlink(symlink), "../target")
Ejemplo n.º 6
0
def test_fix_local_symlinks(deployment_dir):
    d = Deployment("testing")
    d.package_dir = deployment_dir

    local = os.path.join(deployment_dir, "local")
    os.makedirs(local)
    target = os.path.join(deployment_dir, "sometarget")
    symlink = os.path.join(local, "symlink")
    os.symlink(target, symlink)

    d.fix_local_symlinks()
    eq_(os.readlink(symlink), "../sometarget")
Ejemplo n.º 7
0
def test_fix_local_symlinks_does_not_blow_up_on_missing_local(deployment_dir):
    d = Deployment('testing')
    d.package_dir = deployment_dir
    d.fix_local_symlinks()
Ejemplo n.º 8
0
def test_fix_local_symlinks_does_not_blow_up_on_missing_local(deployment_dir):
        d = Deployment('testing')
        d.package_dir = deployment_dir
        d.fix_local_symlinks()