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")
Beispiel #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")
Beispiel #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")
Beispiel #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")
Beispiel #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")
Beispiel #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")
Beispiel #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")
Beispiel #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")
Beispiel #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")
Beispiel #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")
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")
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")
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")
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")
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")
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")