Skip to content

Commit

Permalink
Added some mock data
Browse files Browse the repository at this point in the history
  • Loading branch information
lukas-holzner committed Sep 30, 2024
1 parent 8cd82c9 commit 7d2b1d9
Showing 1 changed file with 63 additions and 0 deletions.
63 changes: 63 additions & 0 deletions test/init_db.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
#!/bin/bash

# Set the base URL
BASE_URL="https://codefusion.lholz.de"

# Function to make a POST request
make_post_request() {
local endpoint=$1
local data=$2
curl -X 'POST' \
"${BASE_URL}${endpoint}" \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d "${data}"
echo # Add a newline for better readability
}

# Initialize meetings
echo "Initializing meetings..."
make_post_request "/meetings/" '{
"title": "Daily Scrum",
"description": "This is the daily scrum meeting of the frontend team.",
"date": "2024-09-30T09:00:00.000Z",
"meeting_type": "daily"
}'

make_post_request "/meetings/" '{
"title": "Sprint Planning",
"description": "Bi-weekly sprint planning session.",
"date": "2024-10-01T14:00:00.000Z",
"meeting_type": "planning"
}'

make_post_request "/meetings/" '{
"title": "GCP Onboarding Discussion",
"description": "Meeting to discuss the process and benefits of onboarding Google Cloud Platform (GCP) for our company.",
"date": "2024-10-03T11:00:00.000Z",
"meeting_type": "discussion"
}'

make_post_request "/meetings/" '{
"title": "Backend Architecture Review",
"description": "Quarterly review of our backend architecture and discussion of potential improvements.",
"date": "2024-10-05T13:30:00.000Z",
"meeting_type": "review"
}'

make_post_request "/meetings/" '{
"title": "Product Demo",
"description": "Monthly product demonstration for stakeholders.",
"date": "2024-10-10T15:00:00.000Z",
"meeting_type": "demo"
}'

# Initialize users
echo "Initializing users..."
make_post_request "/users/" '{"username": "Lukas"}'
make_post_request "/users/" '{"username": "Anna"}'
make_post_request "/users/" '{"username": "Max"}'
make_post_request "/users/" '{"username": "Sophie"}'
make_post_request "/users/" '{"username": "David"}'

echo "Database initialization complete."

0 comments on commit 7d2b1d9

Please sign in to comment.