Esempio n. 1
0
def test_remote_file_owner_group():
    user("foo")
    remote_file("/tmp/nginx.tar.gz",
        source="http://nginx.org/download/nginx-1.0.11.tar.gz",
        checksum="a41a01d7cd46e13ea926d7c9ca283a95",
        group="foo",
        owner="foo")
    assert_equals(sudo('stat -c "%G" /tmp/nginx.tar.gz'), "foo")
    assert_equals(sudo('stat -c "%U" /tmp/nginx.tar.gz'), "foo")
    user("foo", state="deleted")
Esempio n. 2
0
def test_remote_file_owner_group():
    user("foo")
    remote_file("/tmp/nginx.tar.gz",
                source="http://nginx.org/download/nginx-1.0.11.tar.gz",
                checksum="a41a01d7cd46e13ea926d7c9ca283a95",
                group="foo",
                owner="foo")
    assert_equals(sudo('stat -c "%G" /tmp/nginx.tar.gz'), "foo")
    assert_equals(sudo('stat -c "%U" /tmp/nginx.tar.gz'), "foo")
    user("foo", state="deleted")
Esempio n. 3
0
def installation():
    core.package("python-software-properties")
    core.package("python-setuptools")
    core.package("python-dev")

    core.package_repository("ppa:fkrull/deadsnakes")
    core.package("python2.7")

    core.remote_file("/tmp/distribute_setup.py",
        source="http://python-distribute.org/distribute_setup.py",
        mode=0644)

    # Python 2.7
    sudo("python2.7 /tmp/distribute_setup.py")
    sudo("easy_install-2.7 pip")
    sudo("pip-2.7 install virtualenv")

    # Python 2.6
    sudo("easy_install-2.6 pip")
    sudo("pip-2.6 install virtualenv")
Esempio n. 4
0
def installation():
    core.package("python-software-properties")
    core.package("python-setuptools")
    core.package("python-dev")

    core.package_repository("ppa:fkrull/deadsnakes")
    core.package("python2.7")

    core.remote_file("/tmp/distribute_setup.py",
                     source="http://python-distribute.org/distribute_setup.py",
                     mode=0644)

    # Python 2.7
    sudo("python2.7 /tmp/distribute_setup.py")
    sudo("easy_install-2.7 pip")
    sudo("pip-2.7 install virtualenv")

    # Python 2.6
    sudo("easy_install-2.6 pip")
    sudo("pip-2.6 install virtualenv")
Esempio n. 5
0
def test_remote_file_sha1_wrong():
    remote_file("/tmp/nginx.tar.gz",
                source="http://nginx.org/download/nginx-1.0.11.tar.gz",
                checksum="c06144234144261358ccf785e99f751b8ca0a3bb")
Esempio n. 6
0
def test_remote_file_create_mode():
    remote_file("/tmp/nginx.tar.gz",
                source="http://nginx.org/download/nginx-1.0.11.tar.gz",
                checksum="a41a01d7cd46e13ea926d7c9ca283a95",
                mode=0600)
    assert_equals(sudo('stat -c "%a" /tmp/nginx.tar.gz'), "600")
Esempio n. 7
0
def test_remote_file_md5():
    remote_file("/tmp/nginx.tar.gz",
                source="http://nginx.org/download/nginx-1.0.11.tar.gz",
                checksum="a41a01d7cd46e13ea926d7c9ca283a95")
    sudo("test -f /tmp/nginx.tar.gz")
Esempio n. 8
0
def test_remote_file():
    remote_file("/tmp/nginx.tar.gz",
                source="http://nginx.org/download/nginx-1.0.11.tar.gz")
    sudo("test -f /tmp/nginx.tar.gz")
Esempio n. 9
0
def test_remote_file_sha1():
    remote_file("/tmp/nginx.tar.gz",
                source="http://nginx.org/download/nginx-1.0.11.tar.gz",
                checksum="c06144214144b61358ccf785e99f751b8ca0a3bb")
    sudo("test -f /tmp/nginx.tar.gz")
Esempio n. 10
0
def test_remote_file_md5_wrong():
    remote_file("/tmp/nginx.tar.gz",
                source="http://nginx.org/download/nginx-1.0.11.tar.gz",
                checksum="a41a01d7cd46e53ea626d7c9ca283a95")
Esempio n. 11
0
def test_remote_file_sha1_wrong():
    remote_file("/tmp/nginx.tar.gz",
        source="http://nginx.org/download/nginx-1.0.11.tar.gz",
        checksum="c06144234144261358ccf785e99f751b8ca0a3bb")
Esempio n. 12
0
def test_remote_file_create_mode():
    remote_file("/tmp/nginx.tar.gz",
        source="http://nginx.org/download/nginx-1.0.11.tar.gz",
        checksum="a41a01d7cd46e13ea926d7c9ca283a95",
        mode=0600)
    assert_equals(sudo('stat -c "%a" /tmp/nginx.tar.gz'), "600")
Esempio n. 13
0
def test_remote_file_md5():
    remote_file("/tmp/nginx.tar.gz",
        source="http://nginx.org/download/nginx-1.0.11.tar.gz",
        checksum="a41a01d7cd46e13ea926d7c9ca283a95")
    sudo("test -f /tmp/nginx.tar.gz")
Esempio n. 14
0
def test_remote_file():
    remote_file("/tmp/nginx.tar.gz",
        source="http://nginx.org/download/nginx-1.0.11.tar.gz")
    sudo("test -f /tmp/nginx.tar.gz")
Esempio n. 15
0
def test_remote_file_sha1():
    remote_file("/tmp/nginx.tar.gz",
        source="http://nginx.org/download/nginx-1.0.11.tar.gz",
        checksum="c06144214144b61358ccf785e99f751b8ca0a3bb")
    sudo("test -f /tmp/nginx.tar.gz")
Esempio n. 16
0
def test_remote_file_md5_wrong():
    remote_file("/tmp/nginx.tar.gz",
        source="http://nginx.org/download/nginx-1.0.11.tar.gz",
        checksum="a41a01d7cd46e53ea626d7c9ca283a95")