Skip to content

TimRots/appmock

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

appmock


CLI mocking ala busybox

create a config for app foo

mkdir -p ~/.appmock
cat << EOMOCK > ~/.appmock/foo.yml
---
flags:
stdout: |-
  foo
stderr: |-
  bar
exit-status: 1
EOMOCK

test the mock

ln -s ~/bin/appmock foo
./foo && echo $?
foo
bar
1

how to build

# create bin directory in homedir and add it to $PATH
mkdir -p ~/bin
export PATH="$HOME/bin:$PATH"

# clone repo
git clone https://github.com/TimRots/appmock.git && cd appmock

# get dependencies
go get -t -v -d -u ./...

# runnning make will build the binary and place it in ~/bin
make

About

Easy CLI mocking

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published