Fix e2e test suite doc (#10396)

* Fix e2e test suite doc

Signed-off-by: z1cheng <imchench@gmail.com>

* Fix doc script and regenerate

Signed-off-by: z1cheng <imchench@gmail.com>

* Add skip files to the script and regenerate

Signed-off-by: z1cheng <imchench@gmail.com>

---------

Signed-off-by: z1cheng <imchench@gmail.com>
This commit is contained in:
Chen Chen 2023-09-11 16:24:11 +08:00 committed by GitHub
parent cf889c6c47
commit 3d69d9a88b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 615 additions and 390 deletions

File diff suppressed because it is too large Load diff

View file

@ -21,6 +21,12 @@ fi
URL="https://github.com/kubernetes/ingress-nginx/tree/main/"
DIR=$(cd $(dirname "${BASH_SOURCE}")/.. && pwd -P)
declare -A skip_files=(
["$DIR/test/e2e/framework/framework.go"]=1
["$DIR/test/e2e/e2e.go"]=1
["$DIR/test/e2e/e2e_test.go"]=1
)
echo "<!---
This file is autogenerated!
Do not try to edit it manually.
@ -31,8 +37,16 @@ Do not try to edit it manually.
"
for FILE in $(find $DIR/test/e2e -name "*.go");do
# skip files
if [ ${skip_files[$FILE]} ]; then
continue
fi
# describe definition
DESCRIBE=$(cat $FILE | grep -n -oP 'Describe.*')
if [ -z "$DESCRIBE" ]; then
continue
fi
# line number
DESCRIBE_LINE=$(echo $DESCRIBE | cut -f1 -d ':')
# clean describe, extracting the string