Skip to content

Commit

Permalink
test: add tests to ensure subgraph service contracts are owned by the…
Browse files Browse the repository at this point in the history
… governor

Signed-off-by: Tomás Migone <tomas@edgeandnode.com>
  • Loading branch information
tmigone committed Feb 25, 2025
1 parent 6a0fa76 commit 40e8d27
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ const addressBookEntry = graph.subgraphService!.addressBook.getEntry('DisputeMan
const DisputeManager = graph.subgraphService!.contracts.DisputeManager

describe('DisputeManager', function () {
it('should be owned by the governor', async function () {
const owner = await DisputeManager.owner()
expect(owner).to.equal(config.$global.governor)
})

it('should set the right arbitrator', async function () {
const arbitrator = await DisputeManager.arbitrator()
expect(arbitrator).to.equal(config.$global.arbitrator)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ const addressBookEntry = graph.subgraphService!.addressBook.getEntry('SubgraphSe
const SubgraphService = graph.subgraphService!.contracts.SubgraphService

describe('SubgraphService', function () {
it('should be owned by the governor', async function () {
const owner = await SubgraphService.owner()
expect(owner).to.equal(config.$global.governor)
})

it('should set the right minimum provision tokens', async function () {
const [minimumProvisionTokens] = await SubgraphService.getProvisionTokensRange()
expect(minimumProvisionTokens).to.equal(config.SubgraphService.minimumProvisionTokens)
Expand Down Expand Up @@ -40,10 +45,7 @@ describe('SubgraphService', function () {
expect(curationAddress).to.equal(config.$global.curationProxyAddress)
})

it('should set the right pause guardian', async function () {
// const pauseGuardian = await SubgraphService.getPauseGuardian()
// expect(pauseGuardian).to.equal(config.$global.pauseGuardian)
})
it('should set the right pause guardian')

it('should set the right maxPOIStaleness', async function () {
const maxPOIStaleness = await SubgraphService.maxPOIStaleness()
Expand Down

0 comments on commit 40e8d27

Please sign in to comment.