mirror of
https://github.com/oceanprotocol/ocean.js.git
synced 2024-11-26 20:39:05 +01:00
use configuration variables instead of constants
This commit is contained in:
parent
35722239df
commit
9a583e60e0
@ -9,6 +9,7 @@ import { SHA256 } from 'crypto-js'
|
|||||||
import { ProviderFees, Erc20CreateParams } from '../../src/@types'
|
import { ProviderFees, Erc20CreateParams } from '../../src/@types'
|
||||||
import console from 'console'
|
import console from 'console'
|
||||||
import { web3, getTestConfig, getAddresses } from '../config'
|
import { web3, getTestConfig, getAddresses } from '../config'
|
||||||
|
import { Config } from '../../src'
|
||||||
|
|
||||||
const assetUrl = [
|
const assetUrl = [
|
||||||
{
|
{
|
||||||
@ -108,10 +109,17 @@ const algoDdo = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
describe('Simple compute tests', async () => {
|
describe('Simple compute tests', async () => {
|
||||||
const config = await getTestConfig(web3)
|
let config: Config
|
||||||
const addresses = getAddresses()
|
let addresses: any
|
||||||
const aquarius = new Aquarius(config.metadataCacheUri)
|
let aquarius: Aquarius
|
||||||
const providerUrl = config.providerUri
|
let providerUrl: any
|
||||||
|
|
||||||
|
before(async () => {
|
||||||
|
config = await getTestConfig(web3)
|
||||||
|
addresses = getAddresses()
|
||||||
|
aquarius = new Aquarius(config.metadataCacheUri)
|
||||||
|
providerUrl = config.providerUri
|
||||||
|
})
|
||||||
|
|
||||||
it('should publish a dataset, algorithm and start a compute job', async () => {
|
it('should publish a dataset, algorithm and start a compute job', async () => {
|
||||||
const nft = new Nft(web3)
|
const nft = new Nft(web3)
|
||||||
|
@ -2,11 +2,16 @@ import { Provider } from '../../src/provider/Provider'
|
|||||||
import { assert } from 'chai'
|
import { assert } from 'chai'
|
||||||
import { FileMetadata } from '../../src/@types'
|
import { FileMetadata } from '../../src/@types'
|
||||||
import { web3, getTestConfig } from '../config'
|
import { web3, getTestConfig } from '../config'
|
||||||
|
import { Config } from '../../src'
|
||||||
|
|
||||||
describe('Provider tests', async () => {
|
describe('Provider tests', async () => {
|
||||||
const config = await getTestConfig(web3)
|
let config: Config
|
||||||
let providerInstance: Provider
|
let providerInstance: Provider
|
||||||
|
|
||||||
|
before(async () => {
|
||||||
|
config = await getTestConfig(web3)
|
||||||
|
})
|
||||||
|
|
||||||
it('Initialize Ocean', async () => {
|
it('Initialize Ocean', async () => {
|
||||||
providerInstance = new Provider()
|
providerInstance = new Provider()
|
||||||
})
|
})
|
||||||
|
@ -16,6 +16,7 @@ import {
|
|||||||
DispenserCreationParams
|
DispenserCreationParams
|
||||||
} from '../../src/@types'
|
} from '../../src/@types'
|
||||||
import { web3, getTestConfig, getAddresses } from '../config'
|
import { web3, getTestConfig, getAddresses } from '../config'
|
||||||
|
import { Config } from '../../src'
|
||||||
|
|
||||||
let nft: Nft
|
let nft: Nft
|
||||||
let factory: NftFactory
|
let factory: NftFactory
|
||||||
@ -60,10 +61,17 @@ const genericAsset: DDO = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
describe('Publish tests', async () => {
|
describe('Publish tests', async () => {
|
||||||
const config = await getTestConfig(web3)
|
let config: Config
|
||||||
const addresses = getAddresses()
|
let addresses: any
|
||||||
const aquarius = new Aquarius(config.metadataCacheUri)
|
let aquarius: Aquarius
|
||||||
const providerUrl = config.providerUri
|
let providerUrl: any
|
||||||
|
|
||||||
|
before(async () => {
|
||||||
|
config = await getTestConfig(web3)
|
||||||
|
addresses = getAddresses()
|
||||||
|
aquarius = new Aquarius(config.metadataCacheUri)
|
||||||
|
providerUrl = config.providerUri
|
||||||
|
})
|
||||||
|
|
||||||
it('initialise testes classes', async () => {
|
it('initialise testes classes', async () => {
|
||||||
nft = new Nft(web3)
|
nft = new Nft(web3)
|
||||||
|
@ -9,6 +9,7 @@ import { SHA256 } from 'crypto-js'
|
|||||||
import { downloadFile } from '../../src/utils/FetchHelper'
|
import { downloadFile } from '../../src/utils/FetchHelper'
|
||||||
import { ProviderFees, Erc20CreateParams } from '../../src/@types'
|
import { ProviderFees, Erc20CreateParams } from '../../src/@types'
|
||||||
import { web3, getTestConfig, getAddresses } from '../config'
|
import { web3, getTestConfig, getAddresses } from '../config'
|
||||||
|
import { Config } from '../../src'
|
||||||
|
|
||||||
const assetUrl = [
|
const assetUrl = [
|
||||||
{
|
{
|
||||||
@ -49,10 +50,17 @@ const ddo = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
describe('Simple Publish & consume test', async () => {
|
describe('Simple Publish & consume test', async () => {
|
||||||
const config = await getTestConfig(web3)
|
let config: Config
|
||||||
const addresses = getAddresses()
|
let addresses: any
|
||||||
const aquarius = new Aquarius(config.metadataCacheUri)
|
let aquarius: Aquarius
|
||||||
const providerUrl = config.providerUri
|
let providerUrl: any
|
||||||
|
|
||||||
|
before(async () => {
|
||||||
|
config = await getTestConfig(web3)
|
||||||
|
addresses = getAddresses()
|
||||||
|
aquarius = new Aquarius(config.metadataCacheUri)
|
||||||
|
providerUrl = config.providerUri
|
||||||
|
})
|
||||||
|
|
||||||
it('should publish a dataset (create NFT + ERC20)', async () => {
|
it('should publish a dataset (create NFT + ERC20)', async () => {
|
||||||
const nft = new Nft(web3)
|
const nft = new Nft(web3)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user