Skip to content

Commit 9242d98

Browse files
timdavishbbmoz
authored andcommitted
Chore - Small docs update (#170)
* chore(docs): update PR template * chore(docs): update PROBLEMS.md & TESTS.md * chore(docs): update PROBLEMS.md
1 parent b686e07 commit 9242d98

File tree

3 files changed

+24
-19
lines changed

3 files changed

+24
-19
lines changed

docs/PROBLEMS.md

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -20,36 +20,41 @@ General troubleshooting steps:
2020

2121
- Ensure direnv is set up properly with `direnv allow`. See the [development environment setup](DEVELOPER.md) if you have not done so already. If nothing else works, at the very least, run `source .env`.
2222

23-
- Start and seed the MongoDB database: `yarn db`
24-
25-
- Make sure the database is running by running `yarn start:dev` (should see 'Database Connected' in your terminal)
23+
- Make sure the database is running by running `yarn restart` (should see 'Database Connected' in your terminal)
2624

2725
- Make sure database is seeded by either checking the data in Robo 3T if you downloaded that (see [development environment setup](DEVELOPER.md)) or by trying to log in with Kevin's credentials (check them in the `Personas` story in the Icebox on Pivotal Tracker)
2826

27+
**Problem**:
28+
29+
```
30+
Database connection error { MongoNetworkError: failed to connect to server [127.0.0.1:27017] on first connect [MongoNetworkError: connect ECONNREFUSED 127.0.0.1:27017]
31+
```
32+
33+
**Solution**: Try [here](#addressinuse), followed by `yarn restart`
34+
2935
## <a name="addressinuse"></a> Address/port already in use
3036

3137
**Problem**: `Error: address already in use`
3238

33-
**Solution**: `lsof -ti tcp:3000,3001,27017,28017 | xargs kill -9 --no-run-if-empty`
39+
**Solution**: Free all needed ports with `lsof -ti tcp:3000,3001,27017,28017 | xargs kill -9 --no-run-if-empty`
3440

3541
## <a name="containernotrunning"></a> Error response from daemon: Container <id> is not running
3642

3743
**Problem**:
3844
```bash
39-
$ yarn db start
40-
Starting new docker container with MongoDB..
41-
Started container 38ee6b4af0c4481a137209c70bb64784afbd33f4ab5bbb37735aa9d2ca945bf7
42-
Copying seed data to docker container..
43-
Adding seed data to MongoDB..
45+
--- Starting new docker container with MongoDB..
46+
--- Started container 38ee6b4af0c4481a137209c70bb64784afbd33f4ab5bbb37735aa9d2ca945bf7
47+
--- Copying seed data to docker container..
48+
--- Adding seed data to MongoDB..
4449
Error response from daemon: Container 38ee6b4af0c4481a137209c70bb64784afbd33f4ab5bbb37735aa9d2ca945bf7 is not running
4550
error Command failed with exit code 1.
4651
```
4752

4853
**Solution**:
4954
```bash
50-
$ yarn db stop
55+
$ yarn stop
5156
$ docker system prune
52-
$ docker volume rm $(docker volume ls -qf dangling=true)
57+
$ docker volume prune
5358
```
5459

5560
## <a name="errors"></a> Errors
@@ -60,7 +65,7 @@ $ docker volume rm $(docker volume ls -qf dangling=true)
6065

6166
**Problem (3)**:
6267
```bash
63-
$ yarn start:dev
68+
$ yarn start
6469
yarn run v1.3.2
6570
$ NODE_ENV=dev npm-run-all --parallel client:watch server:watch
6671
/bin/sh: npm-run-all: command not found
@@ -74,12 +79,8 @@ info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this comm
7479

7580
**Problem**: I am not seeing anything once I view the app at `localhost:3000`.
7681

77-
**Solution**: `yarn db`
82+
**Solution**: `yarn restart`
7883

7984
## <a name="tests"></a> Test Errors
8085

8186
General information about testing can be found in the [test docs](./TESTS.md).
82-
83-
**Problem**: I tried to run the end-to-end (e2e) tests and they failed.
84-
85-
**Solution**: Make sure the app is freshly running with `yarn restart` before you run the e2e tests in another terminal. If this isn't the issue, then it is possible you have introduced breaking changes that are causing them to fail.

docs/PULL_REQUEST_TEMPLATE.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,22 @@
1010
- [ ] Your pull request targets the `master` branch of calltocode.org
1111
- [ ] Your branch is updated with the latest changes on `master`
1212
- [ ] Your branch passes linting, building and all new and existing tests with command `yarn test`
13+
- [ ] Your branch passes the end-to-end tests with command `yarn e2e`
1314
- [ ] The story that this pull request addresses is referenced above by ID
1415

1516
#### Post-Submission Checklist:
1617
<!-- After creating the pull request, tick the boxes below that are completed -->
1718
<!-- Make sure you keep up with your pull request after submission until it is merged: -->
1819

19-
- [ ] Address any reviews on your pull request, as it will not be merged until it is approved
2020
- [ ] Your branch has no conflicts with `master` (find this out at the bottom of your pull request)
21+
- [ ] Address any reviews on your pull request, as it will be unable to be merged until it is approved
2122

2223
#### Description of Changes:
2324
<!-- Put a description of your changes here -->
2425

26+
#### TODO:
27+
<!-- Put any TODO's here -->
28+
2529
<!-- LINKS:
2630
Contributing guidelines: https://github.com/CodeForSocialGood/calltocode.org/blob/master/docs/CONTRIBUTING.md
2731

docs/TESTS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Tests
22

3-
## End to End (e2e) tests
3+
## End-to-End (e2e) tests
44

55
You can run the e2e tests with `yarn e2e`. This will stop all docker containers, clear the necessary ports, start the containers and the app, and then run the tests.

0 commit comments

Comments
 (0)