Skip to content

Commit

Permalink
Add more logs into the tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
mariacarmina committed Nov 19, 2024
1 parent 478df75 commit 7681750
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 20 deletions.
17 changes: 0 additions & 17 deletions src/publishAsset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,23 +58,6 @@ export async function publishAsset(params: PublishAssetParams, signer: Signer, c
],
};

// stats: {
// allocated: 0,
// orders: 0,
// price: {
// value: params.isCharged ? params.price : "0"
// }
// },
// nft: {
// address: "",
// name: "Ocean Data NFT",
// symbol: "OCEAN-NFT",
// state: 5,
// tokenURI: "",
// owner: "",
// created: ""
// }

// Asset URL setup based on storage type
const assetUrl = {
nftAddress: '0x0', // Will be updated after creating asset
Expand Down
10 changes: 7 additions & 3 deletions test/consumeFlow.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ describe("Ocean CLI Publishing", function() {

it("should publish a dataset using 'npm run cli publish'", function(done) {
const metadataFile = path.resolve(projectRoot, "metadata/simpleDownloadDataset.json");
console.log('metadataFile 1 ', metadataFile);

// Ensure the metadata file exists
if (!fs.existsSync(metadataFile)) {
Expand All @@ -53,13 +54,16 @@ describe("Ocean CLI Publishing", function() {
process.env.AQUARIUS_URL = "http://127.0.0.1:8001";
process.env.PROVIDER_URL = "http://127.0.0.1:8001";
process.env.ADDRESS_FILE = path.join(process.env.HOME || "", ".ocean/ocean-contracts/artifacts/address.json");

console.log('RPC', process.env.RPC);
console.log('AQUARIUS_URL', process.env.AQUARIUS_URL);
console.log('PROVIDER_URL', process.env.PROVIDER_URL);
console.log('ADDRESS_FILE', process.env.ADDRESS_FILE);
exec(`npm run cli publish ${metadataFile}`, { cwd: projectRoot }, (error, stdout) => {
try {
const match = stdout.match(/did:op:[a-f0-9]{64}/);
if (match) {
downloadDatasetDid = match[0];
console.log('match: ', match[0])
console.log('match 1: ', match[0])
}
expect(stdout).to.contain("Asset published. ID:");
done()
Expand All @@ -72,7 +76,7 @@ describe("Ocean CLI Publishing", function() {

it("should publish a compute dataset using 'npm run cli publish'", function(done) {
const metadataFile = path.resolve(projectRoot, "metadata/simpleComputeDataset.json");

console.log('metadataFile', metadataFile);
// Ensure the metadata file exists
if (!fs.existsSync(metadataFile)) {
done(new Error("Metadata file not found: " + metadataFile));
Expand Down

0 comments on commit 7681750

Please sign in to comment.