Skip to content

Commit d25f86b

Browse files
author
Alex Messoussa
committed
Reverted all .sh files to initial state
1 parent d817941 commit d25f86b

File tree

3 files changed

+72
-72
lines changed

3 files changed

+72
-72
lines changed

.csse6400/bin/health.sh

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
1-
#!/bin/bash
2-
#
3-
# Check that the health endpoint is returning 200
4-
5-
# Start flask app
6-
poetry install --no-root
7-
poetry run flask --app todo run -p 6400 &
8-
error=$?
9-
pid=$!
10-
if [[ $error -ne 0 ]]; then
11-
echo "Failed to start flask app"
12-
exit 1
13-
fi
14-
15-
# Wait for flask to start
16-
sleep 5
17-
18-
# Check that the health endpoint is returning 200
19-
curl -s -o /dev/null -w "%{http_code}" http://localhost:6400/api/v1/health | grep 200
20-
error=$?
21-
if [[ $error -ne 0 ]]; then
22-
echo "Failed to get 200 from health endpoint"
23-
exit 1
24-
fi
25-
26-
# Kill flask app
27-
kill $pid
28-
1+
#!/bin/bash
2+
#
3+
# Check that the health endpoint is returning 200
4+
5+
# Start flask app
6+
poetry install --no-root
7+
poetry run flask --app todo run -p 6400 &
8+
error=$?
9+
pid=$!
10+
if [[ $error -ne 0 ]]; then
11+
echo "Failed to start flask app"
12+
exit 1
13+
fi
14+
15+
# Wait for flask to start
16+
sleep 5
17+
18+
# Check that the health endpoint is returning 200
19+
curl -s -o /dev/null -w "%{http_code}" http://localhost:6400/api/v1/health | grep 200
20+
error=$?
21+
if [[ $error -ne 0 ]]; then
22+
echo "Failed to get 200 from health endpoint"
23+
exit 1
24+
fi
25+
26+
# Kill flask app
27+
kill $pid
28+

.csse6400/bin/unittest.sh

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
#!/bin/bash
2-
#
3-
# Copy the tests directory and run the tests
4-
5-
cp -r .csse6400/tests .
6-
7-
poetry install --no-root
8-
poetry run python3 -m unittest discover -s tests
9-
1+
#!/bin/bash
2+
#
3+
# Copy the tests directory and run the tests
4+
5+
cp -r .csse6400/tests .
6+
7+
poetry install --no-root
8+
poetry run python3 -m unittest discover -s tests
9+
Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,35 @@
1-
#!/bin/bash
2-
#
3-
# Validate that the repository has the following structure:
4-
# -- README.md
5-
# -- pyproject.toml
6-
# -- todo
7-
# | -- __init__.py
8-
# | -- views
9-
# | -- routes.py
10-
11-
failed=0
12-
for file in README.md pyproject.toml; do
13-
if [ ! -f "$file" ]; then
14-
echo "FAIL: Missing $file"
15-
failed=1
16-
fi
17-
done
18-
19-
if [ ! -d todo ]; then
20-
echo "FAIL: Missing todo directory"
21-
failed=1
22-
fi
23-
24-
for file in todo/__init__.py todo/views/routes.py; do
25-
if [ ! -f "$file" ]; then
26-
echo "FAIL: Missing $file"
27-
failed=1
28-
fi
29-
done
30-
31-
if [ $failed -eq 1 ]; then
32-
echo "Repository structure is not valid. Please fix the errors above."
33-
exit 1
34-
fi
35-
1+
#!/bin/bash
2+
#
3+
# Validate that the repository has the following structure:
4+
# -- README.md
5+
# -- pyproject.toml
6+
# -- todo
7+
# | -- __init__.py
8+
# | -- views
9+
# | -- routes.py
10+
11+
failed=0
12+
for file in README.md pyproject.toml; do
13+
if [ ! -f "$file" ]; then
14+
echo "FAIL: Missing $file"
15+
failed=1
16+
fi
17+
done
18+
19+
if [ ! -d todo ]; then
20+
echo "FAIL: Missing todo directory"
21+
failed=1
22+
fi
23+
24+
for file in todo/__init__.py todo/views/routes.py; do
25+
if [ ! -f "$file" ]; then
26+
echo "FAIL: Missing $file"
27+
failed=1
28+
fi
29+
done
30+
31+
if [ $failed -eq 1 ]; then
32+
echo "Repository structure is not valid. Please fix the errors above."
33+
exit 1
34+
fi
35+

0 commit comments

Comments
 (0)