Skip to content

Commit 8cc9afa

Browse files
authored
Merge pull request #41 from clowder-framework/improve_simple_test
simple test sends the first time success notification.
2 parents 6399882 + c49fc2a commit 8cc9afa

File tree

2 files changed

+16
-3
lines changed

2 files changed

+16
-3
lines changed

CHANGELOG.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,15 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](http://keepachangelog.com/)
55
and this project adheres to [Semantic Versioning](http://semver.org/).
66

7-
## Unreleased
7+
## [Unreleased]
88

99
### Added
1010
- Script to clean extractors' tmp files.
1111
- Script for RabbitMQ error queue cleanup.
1212

13+
### Changed
14+
- Improved simple test to report all day success.
15+
1316
## 1.10.1 - 2020-07-16
1417

1518
### Fixed

scripts/tester/tester.sh

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ while [ $FILE_UPLOADED = 0 ]; do
5454
echo "File upload not PROCESSED after 2 minutes. There may be a problem. Deleting dataset."
5555
curl -X DELETE $CLOWDER_URL/api/datasets/$DATASET_ID?key=$CLOWDER_KEY
5656
post_message "Upload+extract test script failing on $CLOWDER_URL\/files\/$FILE_ID (status is not PROCESSED)"
57+
rm memoryfile
5758
exit 1
5859
fi
5960
echo "File upload not complete; checking again in 10 seconds."
@@ -83,15 +84,24 @@ while [ $FILE_EXTRACTED -eq 0 ]; do
8384
echo "File extraction not DONE after 4 minutes. There may be a problem. Deleting dataset."
8485
curl -X DELETE $CLOWDER_URL/api/datasets/$DATASET_ID?key=$CLOWDER_KEY
8586
post_message "Upload+extract test script failing on $CLOWDER_URL/files/$FILE_ID (extractor not DONE)"
87+
rm memoryfile
8688
exit 1
8789
fi
8890
echo "File extraction not complete; checking again in 10 seconds."
8991
sleep 10
9092
done
9193
echo "File extraction complete."
92-
94+
95+
today=$(date +'%Y-%m-%d')
96+
if [ ! -e memoryfile ]; then
97+
post_message "Upload+extract test script success!"
98+
elif [ "$(cat memoryfile)" != "$today" ]; then
99+
post_message "Upload+extract test script success!"
100+
fi
101+
echo $today > memoryfile
93102

94103
# ------------------------ Delete dataset ------------------------
95104
curl -X DELETE $CLOWDER_URL/api/datasets/$DATASET_ID?key=$CLOWDER_KEY
96105

97-
echo "Test complete."
106+
107+
echo "Test complete."

0 commit comments

Comments
 (0)