0xIbra / linux-commands-mocking

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Linux command mocking

This simple python app allows you to mock linux commands for your testing purposes.

Warning
The remote_install.sh script edits the $PATH env var so only use it in docker containers or re-edit your $PATH back to original value after your done.

Usage

cli_mock_map.json:

{
    "ls": [
        {
            "input": [ "/home/user" ],
            "output": "list.py                 file.boot"
        },
        {
            "input": [ "/var/log" ],
            "output": "syslog\nlastlog\nsecure.log"
        },
        {
            "input": ["/tmp"],
            "output": {
                "file": "/var/log/alternatives.log"
            }
        }
    ]
}

more docs coming soon...

Source

This repo is a fork of wacekdziewulski/climate

About

License:MIT License


Languages

Language:Python 54.0%Language:Shell 34.8%Language:Dockerfile 11.2%