Open bitoku opened 10 months ago
It looks like Ginkgo is running the test and catching that it failed, but it's just swallowed all information about the test. Even the verbose options don't help:
$ ginkgo -p -vv --show-node-events
Running Suite: Ginkgo Suite - /tmp/tt/ginkgo-test
=================================================
Random Seed: 1700523524
Will run 1 of 1 specs
Running in parallel across 7 processes
------------------------------
• [0.000 seconds]
Add
/tmp/tt/ginkgo-test/ginkgo_test.go:8
adds two numbers
/tmp/tt/ginkgo-test/ginkgo_test.go:9
Timeline >>
> Enter [It] adds two numbers - /tmp/tt/ginkgo-test/ginkgo_test.go:9 @ 11/20/23 23:38:45.485
< Exit [It] adds two numbers - /tmp/tt/ginkgo-test/ginkgo_test.go:9 @ 11/20/23 23:38:45.485 (0s)
<< Timeline
------------------------------
Ran 1 of 1 Specs in 0.009 seconds
SUCCESS! -- 1 Passed | 0 Failed | 0 Pending | 0 Skipped
Ginkgo ran 1 suite in 1.177801911s
Test Suite Failed
For what it's worth, ideally this should work better. It's a reasonably common requirement to mix TestXYZ()
style tests with Ginkgo tests, especially for ExampleABC()
documentation tests.
@blgm actually,when i run my bash script:
#!/usr/bin/env bash
set -ex
cd "$(dirname "$0")"
WORKDIR="$(pwd)"
while getopts ":c:l:" opt; do
case $opt in
c) CONFIG_FILE="$OPTARG"
;;
l) CUSTOM_LABEL="$OPTARG"
;;
\?) echo "Invalid option -$OPTARG" >&2
exit 1
;;
esac
done
if [ -z "${CONFIG_FILE}" ]; then
echo "config file empty"
exit 1
fi
ginkgo -v --show-node-events --trace --label-filter="${CUSTOM_LABEL}" init/... -- -c ${WORKDIR}/configs/${CONFIG_FILE}
ginkgo told me :--show-node-events provide but not defined Could you please tell me how to solve this problem
When these conditions are met, failed test case are not shown.
-p
option is setYou will be able to reproduce this issue in my test repository.
https://github.com/bitoku/ginkgo-test
I know it is not supposed to have both ginkgo spec files and builtin unittest files, but it is very confusing when people want to migrate builtin unittest to ginkgo.