Skip to content

Commit 86e4ccf

Browse files
committed
function keywords are optional
1 parent b6892d3 commit 86e4ccf

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

tests/bashtest.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ TESTS=0
1010
FAILED=0
1111

1212
# Verify that a command succeeds
13-
function assert_success() {
13+
assert_success() {
1414
MESSAGE="$1"
1515
shift
1616
COMMAND="$@"
@@ -26,7 +26,7 @@ function assert_success() {
2626
fi
2727
}
2828

29-
function end_tests() {
29+
end_tests() {
3030
if ((FAILED > 0))
3131
then
3232
echo

tests/test.sh

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ DIST=$(cd "$HERE"/..; pwd)
88
source "${HERE}"/bashtest.sh
99

1010
# test packaing with a single binary
11-
function package_bin() {
11+
package_bin() {
1212
rm -rf target/lambda/release > /dev/null 2>&1
1313
docker run --rm \
1414
-e BIN="$1" \
@@ -20,7 +20,7 @@ function package_bin() {
2020
}
2121

2222
# test packaging all binaries
23-
function package_all() {
23+
package_all() {
2424
rm -rf target/lambda/release > /dev/null 2>&1
2525
docker run --rm \
2626
-v "${PWD}":/code \
@@ -31,7 +31,7 @@ function package_all() {
3131
}
3232

3333
# test packaging with PROFILE=dev
34-
function package_all_dev_profile() {
34+
package_all_dev_profile() {
3535
rm -rf target/lambda/debug > /dev/null 2>&1
3636
docker run --rm \
3737
-e PROFILE=dev \
@@ -46,7 +46,11 @@ for project in test-func test-multi-func; do
4646
cd "${HERE}"/"${project}"
4747

4848
# package tests
49-
assert_success "it packages single bin" package_bin bootstrap
49+
if [[ "$project" == test-func ]]; then
50+
assert_success "it packages single bin" package_bin bootstrap
51+
else
52+
assert_success "it packages single bin" package_bin bootstrap
53+
fi
5054

5155
assert_success "it packages all bins with dev profile" package_all_dev_profile
5256

0 commit comments

Comments
 (0)