Skip to content
This repository has been archived by the owner on Oct 26, 2022. It is now read-only.

Commit

Permalink
test/oracles: print warning&trace&skip if chain forking is not available
Browse files Browse the repository at this point in the history
  • Loading branch information
pinkiebell committed Feb 11, 2021
1 parent 0732b09 commit c0e1aef
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/oracles/ChainlinkOracle.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ describe("ChainLink Oracle", function () {
expect(await this.oracle.symbol(this.oracleData)).to.equal("LINK")
})

if (!hre.network.config.forking) {
console.trace("*** chain forking not available, skipping tests ***");
return;
}

it("should return SUSHI Price on rate request", async function () {
await this.oracle.get(this.oracleData)
const [success, rate] = await this.oracle.peek(this.oracleData)
Expand Down
5 changes: 5 additions & 0 deletions test/oracles/CompoundOracle.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ describe("Compound Oracle", function () {
expect(await this.oracle.symbol(this.oracleData)).to.equal("COMP")
})

if (!hre.network.config.forking) {
console.trace("*** chain forking not available, skipping tests ***");
return;
}

it("should return ETH Price in USD on rate request", async function () {
await this.oracle.get(this.oracleData)
const [success, rate] = await this.oracle.peek(this.oracleData)
Expand Down

0 comments on commit c0e1aef

Please sign in to comment.