You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 27, 2019. It is now read-only.
When writing tests where a parameter is an array, we end up writing out a string version of the array. This breaks tests like package. Here are some example failures related to this issue:
Arrays should be treated like arrays, not strings:
9) blp-chef-workstation::_os installs package "mysql-connector-python"
Failure/Error: expect(chef_run).to install_package('mysql-connector-python').with(package_name: '["mysql-connector-python"]')
expected "yum_package[mysql-connector-python]" to have parameters:
package_name "[\"mysql-connector-python\"]", was ["mysql-connector-python"]
# ./spec/umami/unit/recipes/_os_spec.rb:39:in `block (2 levels) in <top (required)>'
10) blp-chef-workstation::_os installs package "ksh, lsof, procps, psmisc, strace, sysstat, tcpdump, telnet, unzip, zsh"
Failure/Error: expect(chef_run).to install_package('ksh, lsof, procps, psmisc, strace, sysstat, tcpdump, telnet, unzip, zsh').with(package_name: '["ksh", "lsof", "procps", "psmisc", "strace", "sysstat", "tcpdump", "telnet", "unzip", "zsh"]')
expected "yum_package[ksh, lsof, procps, psmisc, strace, sysstat, tcpdump, telnet, unzip, zsh]" to have parameters:
package_name "[\"ksh\", \"lsof\", \"procps\", \"psmisc\", \"strace\", \"sysstat\", \"tcpdump\", \"telnet\", \"unzip\", \"zsh\"]", was ["ksh", "lsof", "procps", "psmisc", "strace", "sysstat", "tcpdump", "telnet", "unzip", "zsh”]
The likely behavior we want is that if we encounter an array (say, of packages), we write a looping test, like so:
When writing tests where a parameter is an array, we end up writing out a string version of the array. This breaks tests like
package
. Here are some example failures related to this issue:The likely behavior we want is that if we encounter an array (say, of packages), we write a looping test, like so:
The text was updated successfully, but these errors were encountered: