Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Add dependency for hexdump
hexdump is used in common function generate_hex_string which is
used by nova and heat.  The current general dependencies do not
have this dependency covered, instead it is usually pulled in by
other implicit dependencies when a full devstack is built. In
cases where only a subset is built (like just Heat and keystone)
hexdump is missing.

Added unit tests for the generate_hex_string function.

Depends-On: Ib47d802a31a0f4c2a49daa7e6698e37c70a2365a
Change-Id: I77c8c2019fb8b8174cdfaed3e56ebf728f0732b7
Closes-Bug: #1558672
(cherry picked from commit d99c290)
  • Loading branch information
kramvan1 authored and Sergey Kraynev committed Mar 28, 2016
commit 603fc0c6ec58a0fec060a1030e58b5f7e56794d4
1 change: 1 addition & 0 deletions files/debs/general
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
bc
bridge-utils
bsdmainutils
curl
g++
gcc
Expand Down
1 change: 1 addition & 0 deletions files/rpms-suse/general
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,6 @@ screen
tar
tcpdump
unzip
util-linux
wget
zlib-devel
1 change: 1 addition & 0 deletions files/rpms/general
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ screen
tar
tcpdump
unzip
util-linux
wget
which
zlib-devel
16 changes: 16 additions & 0 deletions tests/test_functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,22 @@ source $TOP/functions

source $TOP/tests/unittest.sh

echo "Testing generate_hex_string()"

VAL=$(generate_hex_string 16)
if [[ ${#VAL} -eq 32 ]]; then
passed "OK"
else
failed "generate_hex_string 16 failed ${#VAL}"
fi

VAL=$(generate_hex_string 32)
if [[ ${#VAL} -eq 64 ]]; then
passed "OK"
else
failed "generate_hex_string 32 failed ${#VAL}"
fi

echo "Testing die_if_not_set()"

bash -c "source $TOP/functions; X=`echo Y && true`; die_if_not_set $LINENO X 'not OK'"
Expand Down