pm2/test/bash/get-set.sh
2017-04-22 15:58:28 +02:00

25 lines
399 B
Bash

#!/usr/bin/env bash
SRC=$(cd $(dirname "$0"); pwd)
source "${SRC}/include.sh"
cd $file_path
$pm2 unset all
spec "Should unset all variables"
ls ~/.pm2/module_conf.json
spec "Should file exists"
$pm2 get
$pm2 set key1 val1
cat ~/.pm2/module_conf.json | grep "key1"
spec "Should key exists"
$pm2 unset key1
cat ~/.pm2/module_conf.json | grep "key1"
ispec "Should key not exists"
rm -rf ~/.pm2