Beispiel #1
0
def test_ssh_client():
    """Test SSH client.
    """
    cmd = "xinstall sshc -c"
    run_cmd(cmd)
    RWX_ALL = stat.S_IRWXU | stat.S_IRWXG | stat.S_IRWXO
    for path in (Path.home() / ".ssh").glob("**/*"):
        st = path.stat()
        assert st.st_uid == os.getuid()
        assert st.st_gid == os.getgid()
        if path.is_file():
            assert st.st_mode & RWX_ALL == stat.S_IRUSR | stat.S_IWUSR
        else:
            assert st.st_mode & RWX_ALL == stat.S_IRWXU
Beispiel #2
0
def test_github():
    """Test the github command.
    """
    cmd = "xinstall github -r dclong/xinstall -k whl -o xinstall.wheel"
    msg = "rate limit exceeded for url"
    try:
        run_cmd(cmd, capture_output=True)
    except HTTPError as err:
        if msg in str(err):
            return
        raise err
    except CalledProcessError as err:
        if msg in err.stderr.decode():
            return
        raise err
Beispiel #3
0
def test_intellij_idea():
    """Test installing and configuring IntelliJ Idea.
    """
    run_cmd("xinstall intellij")
Beispiel #4
0
def test_bash_lsp():
    """Test installing Bash Language Server.
    """
    run_cmd("xinstall svim -ic")
    run_cmd("xinstall bash_lsp -c")
Beispiel #5
0
def test_ipython():
    """Test installing and configuring LightGBM.
    """
    cmd = "xinstall ipython -ic && python3 -m IPython -c ls"
    run_cmd(cmd)
Beispiel #6
0
def test_poetry():
    """Test installing and configuring Poetry.
    """
    cmd = "xinstall poetry -ic"
    run_cmd(cmd)
Beispiel #7
0
def test_rustup():
    """Test installing the Rust programming language.
    """
    cmd = "xinstall --sudo -y rustup -ic"
    run_cmd(cmd)
Beispiel #8
0
def test_golang():
    """Test installing GoLANG.
    """
    cmd = "xinstall --sudo -y golang -ic"
    run_cmd(cmd)
Beispiel #9
0
def test_jenv():
    """Test installing jEnv.
    """
    cmd = "xinstall -y jenv -ic"
    run_cmd(cmd)
Beispiel #10
0
def test_pyenv():
    """Test installing PyEnv.
    """
    cmd = "xinstall --sudo -y pyenv -ic"
    run_cmd(cmd)
Beispiel #11
0
def test_nodejs():
    """Test installing nodejs.
    """
    cmd = "xinstall --sudo -y nodejs -ic"
    run_cmd(cmd)
Beispiel #12
0
def test_pyjnius():
    """Test installing and configuring pyjnius.
    """
    cmd = "xinstall pyjnius -ic"
    run_cmd(cmd)
Beispiel #13
0
def test_git():
    """Test installing and configuring Git.
    """
    cmd = "xinstall --sudo -y git -ic"
    run_cmd(cmd)
Beispiel #14
0
def test_pg_formatter():
    """Test installing and configuring pgFormatter.
    """
    cmd = "xinstall --sudo pgfmt -ic"
    run_cmd(cmd)
Beispiel #15
0
def test_proxychains():
    """Test installing the blogging tools.
    """
    cmd = "xinstall --sudo -y pc -ic"
    run_cmd(cmd)