import { assert } from 'chai' import { config } from '../config' import { Ocean, Account, DDO, MetaData } from '../../src' // @oceanprotocol/squid import { getMetadata, computeService } from '../utils' describe('Compute', () => { let ocean: Ocean let account: Account let ddoAsset: DDO let ddoAlgorithm: DDO let agreementId: string const metadataAsset = getMetadata() const metadataAlgorithm = getMetadata(0, 'algorithm') before(async () => { ocean = await Ocean.getInstance(config) ;[account] = await ocean.accounts.list() ddoAsset = await ocean.assets.create(metadataAsset as MetaData, account, [ computeService ]) ddoAlgorithm = await ocean.assets.create(metadataAlgorithm as MetaData, account) // order compute service agreementId = await ocean.compute.order(account, ddoAsset.id) }) it('should start a compute job', async () => { const response = await ocean.compute.start(account, agreementId, ddoAlgorithm.id) assert.equal(response.status, 1) }) })