Exemplo n.º 1
0
def test_directory_user():
    user("foo")
    directory("/var/web/foobar", group="foo")
    assert_equals(sudo('stat -c "%G" /var/web/foobar'), "foo")
    user("foo", state="deleted")
Exemplo n.º 2
0
def test_directory_no_root():
    directory("/") 
Exemplo n.º 3
0
def test_directory_delete():
    directory("/var/web/foobar", state="deleted")
    sudo("test ! -d /var/web/foobar")
Exemplo n.º 4
0
def test_directory_context_manager():
    with directory("/var/web/upickem"):
        assert_equals("/var/web/upickem", sudo("pwd"))
Exemplo n.º 5
0
def test_directory_create():
    directory("/var/web/upickem")
    sudo("test -d /var/web/upickem")
Exemplo n.º 6
0
def test_directory_create_mode():
    directory("/var/web/boom", mode=0666)
    assert_equals(sudo('stat -c "%a" /var/web/boom'), "666")
Exemplo n.º 7
0
def test_directory_invalid_state():
    directory("/var/web/upickem", state="foobar")