Skip to content

Commit

Permalink
Updating to remove barge from readme and add it into the testing guide
Browse files Browse the repository at this point in the history
  • Loading branch information
jamiehewitt15 committed Aug 15, 2024
1 parent daa6b66 commit 1f7b852
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 34 deletions.
44 changes: 12 additions & 32 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,33 +58,25 @@ pm2 delete ocean-node # Delete the process
### Prerequisites

- **Node Version:** Install the node version specified in `.nvmrc`.
- **Docker**
- **Docker compose**
- **nvm** (recommended but not necessary))

### 1. Set Up Environment
### 1. Start the Typesense database

1. **Use the correct Node.js version:**
`nvm use`
`docker-compose -f typesense-compose.yml up -d`

2. **Install dependencies:**
`npm install`

### 2. Build the Project

`npm run build`

### 3. Start Required Services

In a separate terminal, clone and start the necessary services using Barge:
### 2. Install dependencies & build the project

```bash
git clone https://github.com/oceanprotocol/barge.git
cd barge
git checkout feature/nodes
./start_ocean.sh --with-c2d
nvm use # Use the correct Node.js version
npm install # Install dependencies
npm run build # Build the Project
```

### 4. Configure Environment Variables
### 3. Configure Environment Variables

**Option 1: Automatic Setup (Recommended)**
#### Option 1: Automatic Setup (Recommended)

Run the helper script to generate and set up the recommended environment variables:

Expand All @@ -93,7 +85,7 @@ Run the helper script to generate and set up the recommended environment variabl
source .env
```

**Option 2: Manual Setup**
#### Option 2: Manual Setup

Manually set the required environment variables:

Expand All @@ -109,18 +101,6 @@ For all available configurations, refer to the [Environment Variables](docs/env.

Your node is now running, the dashboard will be available at `http://localhost:8000/dashboard/`. To start additional nodes, repeat these steps in a new terminal.

## Testing

Run unit and integration tests to ensure everything is set up correctly:

- **Unit Tests:**
`npm run test:unit`

- **Integration Tests:**
`npm run test:integration`

For advanced testing scenarios, refer to the [Testing Guide](docs/testing.md).

## Additional Resources

- [Ocean Nodes Architecture](docs/Arhitecture.md)
Expand Down
14 changes: 12 additions & 2 deletions docs/testing.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,28 @@
# Tests

### Unit tests
## Unit tests

```bash
npm run test:unit
```

## Integration tests

To run the integration tests, you should start barge locally. In a separate terminal, clone and start the necessary services using Barge:

````bash
git clone https://github.com/oceanprotocol/barge.git
cd barge
git checkout feature/nodes
./start_ocean.sh -with-c2d
'''
Now, back in your nodes terminal, you can run the tests
```bash
npm run test:integration
```
````
If you started barge without c2d components you can run a lighter version of integration tests that do not run the compute to data tests.
Expand Down

0 comments on commit 1f7b852

Please sign in to comment.