1
0
mirror of https://github.com/oceanprotocol/commons.git synced 2023-03-15 18:03:00 +01:00

Merge pull request #164 from oceanprotocol/feature/pacific-copy

default all connections to Pacific
This commit is contained in:
Matthias Kretschmann 2019-07-04 09:49:18 +01:00 committed by GitHub
commit a3838ba7c3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 49 additions and 48 deletions

View File

@ -1 +0,0 @@
node_modules

View File

@ -19,7 +19,8 @@
"@typescript-eslint/member-delimiter-style": [
"error",
{ "multiline": { "delimiter": "none" } }
]
],
"@typescript-eslint/no-explicit-any": "off"
},
"env": {
"es6": true,

View File

@ -13,12 +13,12 @@ addons:
env:
global:
# run E2E tests against these values
- REACT_APP_NODE_URI="https://nile.dev-ocean.com"
- REACT_APP_AQUARIUS_URI="https://aquarius.nile.dev-ocean.com"
- REACT_APP_BRIZO_URI="https://brizo.nile.dev-ocean.com"
- REACT_APP_SECRET_STORE_URI="https://secret-store.nile.dev-ocean.com"
- REACT_APP_FAUCET_URI="https://faucet.nile.dev-ocean.com"
- REACT_APP_BRIZO_ADDRESS="0x4aaab179035dc57b35e2ce066919048686f82972"
- REACT_APP_NODE_URI="https://pacific.oceanprotocol.com"
- REACT_APP_AQUARIUS_URI="https://aquarius.commons.oceanprotocol.com"
- REACT_APP_BRIZO_URI="https://brizo.commons.oceanprotocol.com"
- REACT_APP_SECRET_STORE_URI="https://secret-store.oceanprotocol.com"
- REACT_APP_FAUCET_URI="https://faucet.oceanprotocol.com"
- REACT_APP_BRIZO_ADDRESS="0x008c25ed3594e094db4592f4115d5fa74c4f41ea"
before_install:
- npm install -g npm
@ -29,7 +29,10 @@ before_install:
script:
# - ./scripts/install.sh # runs automatically with npm ci
- ./scripts/test.sh
# executing `npm test` scripts individually here, so first one failing will exit the build
- npm run lint || travis_terminate 1
- ./scripts/test.sh || travis_terminate 1
- npm run test:e2e || travis_terminate 1
- ./scripts/coverage.sh
- ./scripts/build.sh

View File

@ -23,7 +23,7 @@
If you're a developer and want to contribute to, or want to utilize this marketplace's code in your projects, then keep on reading.
- [🏄 Get Started](#-Get-Started)
- [🏖 Remote Ocean: Nile](#-Remote-Ocean-Nile)
- [🏖 Remote Ocean: Pacific](#-Remote-Ocean-Pacific)
- [🐳 Use with Barge](#-Use-with-Barge)
- [⛵️ Environment Variables](#-Environment-Variables)
- [👩‍🔬 Testing](#-Testing)
@ -52,15 +52,17 @@ npm start
Open [http://localhost:3000](http://localhost:3000) to view the client in the browser. The page will reload if you make edits to files in either `./client` or `./server`.
### 🏖 Remote Ocean: Nile
### 🏖 Remote Ocean: Pacific
To make use of all the functionality, you need to connect to the Ocean network. By default, the client will connect to Ocean components running within [Ocean's Nile test network](https://docs.oceanprotocol.com/concepts/testnets/#the-nile-testnet) remotely.
To make use of all the functionality, you need to connect to an Ocean network.
This means you need to connect with your MetaMask to the Nile network too. To do this:
By default, the client will connect to Ocean components running within [Ocean's Pacific network](https://docs.oceanprotocol.com/concepts/pacific-network/) remotely.
With your MetaMask, connect to the Pacific network. To do this:
1. select Custom RPC in the network dropdown in MetaMask
2. under New Network, enter `https://nile.dev-ocean.com` as the custom RPC URL
3. Hit _Save_, and youre now connected to Nile
2. under New Network, enter `https://pacific.oceanprotocol.com` as the custom RPC URL
3. Hit _Save_, and youre now connected to Pacific
### 🐳 Use with Barge
@ -100,6 +102,8 @@ To run all linting, unit and integration tests in one go, run:
npm test
```
The endpoints the integration tests run against are defined by your [Environment Variables](#-Environment-Variables), and Cypress-specific variables in `cypress.json`.
### Unit Tests
For local development, you can start the test runners for client & server in a watch mode.
@ -128,8 +132,6 @@ npm run test:e2e
This will automatically spin up all required resources to run the integrations tests, and then run them.
The endpoints Cypress runs against are defined by your [Environment Variables](#-Environment-Variables), and Cypress-specific variables in `cypress.json`.
You can also use the UI of Cypress to run and inspect the integration tests locally:
```bash

View File

@ -1,27 +1,27 @@
#
# When none of the following variables are set,
# Commons will default connecting to Nile
# Commons will default connecting to Pacific
#
#
# Connect to Pacific
#
# REACT_APP_NODE_URI="https://pacific.oceanprotocol.com"
# REACT_APP_AQUARIUS_URI="https://aquarius.pacific.dev-ocean.com"
# REACT_APP_BRIZO_URI="https://brizo.pacific.dev-ocean.com"
# REACT_APP_SECRET_STORE_URI="https://secret-store.pacific.oceanprotocol.com"
# REACT_APP_FAUCET_URI="https://faucet.pacific.dev-ocean.com"
# REACT_APP_BRIZO_ADDRESS="0x008c25ed3594e094db4592f4115d5fa74c4f41ea"
REACT_APP_NODE_URI="https://pacific.oceanprotocol.com"
REACT_APP_AQUARIUS_URI="https://aquarius.commons.oceanprotocol.com"
REACT_APP_BRIZO_URI="https://brizo.commons.oceanprotocol.com"
REACT_APP_SECRET_STORE_URI="https://secret-store.oceanprotocol.com"
REACT_APP_FAUCET_URI="https://faucet.oceanprotocol.com"
REACT_APP_BRIZO_ADDRESS="0x008c25ed3594e094db4592f4115d5fa74c4f41ea"
#
# Connect to Nile
#
REACT_APP_NODE_URI="https://nile.dev-ocean.com"
REACT_APP_AQUARIUS_URI="https://nginx-aquarius.dev-ocean.com"
REACT_APP_BRIZO_URI="https://nginx-brizo.dev-ocean.com"
REACT_APP_SECRET_STORE_URI="https://secret-store.dev-ocean.com"
REACT_APP_FAUCET_URI="https://faucet.nile.dev-ocean.com"
REACT_APP_BRIZO_ADDRESS="0x4aaab179035dc57b35e2ce066919048686f82972"
# REACT_APP_NODE_URI="https://nile.dev-ocean.com"
# REACT_APP_AQUARIUS_URI="https://aquarius.nile.dev-ocean.com"
# REACT_APP_BRIZO_URI="https://brizo.nile.dev-ocean.com"
# REACT_APP_SECRET_STORE_URI="https://secret-store.nile.dev-ocean.com"
# REACT_APP_FAUCET_URI="https://faucet.nile.dev-ocean.com"
# REACT_APP_BRIZO_ADDRESS="0x4aaab179035dc57b35e2ce066919048686f82972"
#
# Connect to Duero
@ -47,7 +47,7 @@ REACT_APP_BRIZO_ADDRESS="0x4aaab179035dc57b35e2ce066919048686f82972"
# Connect to Spree (local with Barge)
#
# REACT_APP_NODE_URI="http://localhost:8545"
# REACT_APP_AQUARIUS_URI="http://aquarius:5000"
# REACT_APP_AQUARIUS_URI="http://localhost:5000"
# REACT_APP_BRIZO_URI="http://localhost:8030"
# REACT_APP_SECRET_STORE_URI="http://localhost:12001"
# REACT_APP_FAUCET_URI="http://localhost:3001"

View File

@ -8,19 +8,20 @@ export const serviceUri =
// OCEAN REMOTE CONNECTIONS
//
export const nodeUri =
process.env.REACT_APP_NODE_URI || 'https://nile.dev-ocean.com'
process.env.REACT_APP_NODE_URI || 'https://pacific.oceanprotocol.com'
export const aquariusUri =
process.env.REACT_APP_AQUARIUS_URI || 'https://aquarius.nile.dev-ocean.com'
process.env.REACT_APP_AQUARIUS_URI ||
'https://aquarius.commons.oceanprotocol.com'
export const brizoUri =
process.env.REACT_APP_BRIZO_URI || 'https://brizo.nile.dev-ocean.com'
process.env.REACT_APP_BRIZO_URI || 'https://brizo.commons.oceanprotocol.com'
export const brizoAddress =
process.env.REACT_APP_BRIZO_ADDRESS ||
'0x4aaab179035dc57b35e2ce066919048686f82972'
'0x008c25ed3594e094db4592f4115d5fa74c4f41ea'
export const secretStoreUri =
process.env.REACT_APP_SECRET_STORE_URI ||
'https://secret-store.nile.dev-ocean.com'
'https://secret-store.oceanprotocol.com'
export const faucetUri =
process.env.REACT_APP_FAUCET_URI || 'https://faucet.nile.dev-ocean.com'
process.env.REACT_APP_FAUCET_URI || 'https://faucet.oceanprotocol.com'
//
// APP CONFIG

View File

@ -8,7 +8,7 @@ class About extends Component {
return (
<Route
title="About"
description="A marketplace to find and publish open data sets in the Ocean Network."
description="A marketplace to find and publish open data sets in the Ocean Pacific Network."
>
<Content>
<p>

View File

@ -1,7 +1,6 @@
import React from 'react'
import { render, fireEvent, waitForElement } from '@testing-library/react'
import mockAxios from 'jest-mock-axios'
import { serviceUri } from '../../../config'
import Files from '.'
const onChange = jest.fn()

View File

@ -1,8 +1,8 @@
{
"baseUrl": "http://localhost:3000",
"env": {
"NODE_URI": "https://nile.dev-ocean.com",
"NODE_URI": "https://pacific.oceanprotocol.com",
"SEEDPHRASE": "taxi music thumb unique chat sand crew more leg another off lamp",
"CONSUME_ASSET": "did:op:73f50d7449ca478aabd2f34116dbdb1acf4304a407aa4251ab75ce15257b63bd"
"CONSUME_ASSET": "did:op:8f0086cf21e84389ad69b3272c56bd0ddc12cd7d98db4e02b4075c481fc2d32d"
}
}

View File

@ -8,7 +8,7 @@
"start": "concurrently \"cd client && npm start\" \"cd server && npm start\"",
"start:commons-and-ganache": "concurrently 'npm run start:ganache' 'npm run start'",
"build": "./scripts/build.sh",
"test": "npm run lint && scripts/test.sh",
"test": "npm run lint && scripts/test.sh && npm run test:e2e",
"test:e2e": "start-test start:commons-and-ganache http-get://localhost:3000 cypress:run",
"test:watch": "npm run lint && concurrently \"cd client && npm run test:watch\" \"cd server && npm run test:watch\"",
"start:ganache": "ganache-cli -m 'stamp polar cup smart ill agree human episode reform trigger text forget' -i 5777",

View File

@ -1,4 +1,4 @@
#/usr/bin/env/sh
#!/bin/bash
set -e
components="server client"
@ -10,7 +10,3 @@ do
npm test
cd ..
done
echo "Running End-to-End tests"
npm run test:e2e

View File

@ -64,7 +64,7 @@ app.get('/', (req, res) => {
app.use('/api/v1/urlcheck', UrlCheckRouter)
/// catch 404
app.use((req, res, next) => {
app.use((req, res) => {
res.status(404).send()
})