From 9e7746e3f7cec32e18223b831edaba876d09f222 Mon Sep 17 00:00:00 2001 From: Chiemezuo Date: Mon, 11 Dec 2023 14:23:39 +0100 Subject: [PATCH 1/3] git ignore dependency managers --- zubhub_backend/.gitignore | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/zubhub_backend/.gitignore b/zubhub_backend/.gitignore index 3b2ea803b..455377f10 100644 --- a/zubhub_backend/.gitignore +++ b/zubhub_backend/.gitignore @@ -11,3 +11,9 @@ cadvisor.htpasswd .ssl-data celerybeat-schedule celerybeat.pid +# Ignore package.json and package-lock.json files +**/package.json +**/package-lock.json +# Ignore Pipfile and Pipfile.lock files +**/Pipfile +**/Pipfile.lock \ No newline at end of file From 69a16870b52cf7e3342566f5dc555d307f6c64c2 Mon Sep 17 00:00:00 2001 From: Chiemezuo Date: Mon, 11 Dec 2023 15:24:03 +0100 Subject: [PATCH 2/3] add instructions for enabling rabbitmq loopback --- README.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/README.md b/README.md index 775a077af..e37796b39 100644 --- a/README.md +++ b/README.md @@ -165,6 +165,25 @@ To stop: ``` You can run test by running `make test`. +> **_NOTE_**: While running tests, follow these steps if you encounter an error whose last line in the traceback is: +```sh +amqp.exceptions.AccessRefused: (0, 0): (403) ACCESS_REFUSED - Login was refused using authentication mechanism AMQPLAIN. For details see the broker logfile. +``` +1. From the command line, get the rabbitmq container id from the list of running containers and copy it. You can get the list by running: ```$ docker ps``` +2. Copy the configuration file from the docker container to a path in your local machine you can use: +```sh +$ docker cp :/etc/rabbitmq/rabbitmq.conf . +``` +3. Open the `rabbitmq.conf` file from where you've copied it to in your local machine, with a text editor. +4. Change `loopback_users.admin` to `false`, save the file, and then close it. +5. Copy the `rabbitmq.conf` back to its original location in the container. You can do this via: +```sh +$ docker cp rabbitmq.conf :/etc/rabbitmq/rabbitmq.conf +``` +6. Run `make init`, and then run `make test` again. + +**Note**: Alternatively, if you have a text editor configured with your Docker, you could just do only step 4 and then restart the container. + For other make commands: run **make help** Visit http://localhost:8000 on your browser to access the API documentation. From 44dc1f9810e6c71105bbbeced4408005e0f4d0ac Mon Sep 17 00:00:00 2001 From: Chiemezuo Date: Tue, 19 Dec 2023 11:56:05 +0100 Subject: [PATCH 3/3] modify readme to be more accurate --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e37796b39..d33193c0b 100644 --- a/README.md +++ b/README.md @@ -180,7 +180,7 @@ $ docker cp :/etc/rabbitmq/rabbitmq.conf . ```sh $ docker cp rabbitmq.conf :/etc/rabbitmq/rabbitmq.conf ``` -6. Run `make init`, and then run `make test` again. +6. Restart the container, and then run `make test` again. **Note**: Alternatively, if you have a text editor configured with your Docker, you could just do only step 4 and then restart the container.