2023-09-21.16-35-36.mp4
Debugging AirBnB projects can become challenging as you progress through related tasks. To make the process easier, we've created a set of Bash scripts that allow you to test and verify various tasks effortlessly. Currently, we have scripts for tasks 6, 7, 8, and 10.
To get started, follow these steps:
- Clone this repository to your local machine using the following command (outside of AirBnB_Clone_v2):
git clone https://github.com/nuuxcode/AirBnB_Clone_v2_Debugging.git
- Change your working directory to the cloned repository:
cd AirBnB_Clone_v2_Debugging
- Copy all the files inside Scripts folder to the AirBnB directory:
cd Scripts
cp * /Your/AirBnb/Path
- Change your working directory to the AirBnB project
cd /Your/AirBnb/Path
- Run the desired script by executing
./c10.sh (example for task10)
The config.txt file contains default MySQL configuration.
HBNB_MYSQL_USER=hbnb_dev
HBNB_MYSQL_PWD=hbnb_dev_pwd
HBNB_MYSQL_HOST=localhost
HBNB_MYSQL_DB=hbnb_dev_db
HBNB_TYPE_STORAGE=db
YOUR_MYSQL_SERVER=localhost
YOUR_USER_MYSQL=root
YOUR_PASSWORD_MYSQL=root
Ensure that you copy scripts to the correct directory where the python file console.py exists.
When you execute a script for a specific task, it will execute all commands and provide the results, you have to compare it to the task examples.
When you run the script for task 8 or 9, it automatically creates a City and a User because creating a Place requires both a User ID and a City ID, and creating a review needs them too.
- Simplified Testing: These scripts simplify the process of testing and verifying different tasks, reducing the likelihood of errors.
- Efficiency: By automating the setup and execution of related tasks, you save time and effort.
- Consistency: The scripts ensure that each task is executed consistently, minimizing variations in testing.
With these Bash scripts, debugging your AirBnB project becomes more efficient and less error-prone. Happy debugging!