sstephenson / bats

Bash Automated Testing System
MIT License
7.12k stars 518 forks source link

Cannot allocate more than 512MB for bats test #223

Closed rameshvs02 closed 7 years ago

rameshvs02 commented 7 years ago

/usr/local/libexec/bats-exec-test: xrealloc: .././subst.c:5265: cannot allocate 268435456 bytes (537141248 bytes allocated)

vagrant@proxysql:~$ bats connection-check.bats
 ✗ run proxysql-admin setup
   (in test file connection-check.bats, line 3)
     `run yes n | sudo proxysql-admin -e' failed

   This script will assist with configuring ProxySQL (currently only Percona XtraDB cluster in combination with ProxySQL is supported)

   ProxySQL read/write configuration mode is loadbal

   Configuring ProxySQL monitoring user..
   ProxySQL monitor username as per command line/config-file is monitor

   /usr/local/libexec/bats-exec-test: xrealloc: .././subst.c:5265: cannot allocate 268435456 bytes (537141248 bytes allocated)
   Please type [y/n]! Terminating.

1 test, 1 failure
vagrant@proxysql:~$
vagrant@proxysql:~$ cat connection-check.bats
## Connection check bats tests
@test "run proxysql-admin setup" {
run yes n | sudo proxysql-admin -e
echo "$output"
    [ "$status" -eq  0 ]
}
vagrant@proxysql:~$ 
rameshvs02 commented 7 years ago

It is working if we replace yes n | sudo proxysql-admin -e with sudo proxysql-admin -e <<< 'n'