Skip to content

Commit 6e59d7e

Browse files
committed
test: add tests to ensure subgraph service contracts are owned by the governor
Signed-off-by: Tomás Migone <[email protected]>
1 parent 60ed29f commit 6e59d7e

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

packages/subgraph-service/test/deployment/DisputeManager.test.ts

+5
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ const addressBookEntry = graph.subgraphService!.addressBook.getEntry('DisputeMan
1010
const DisputeManager = graph.subgraphService!.contracts.DisputeManager
1111

1212
describe('DisputeManager', function () {
13+
it('should be owned by the governor', async function () {
14+
const owner = await DisputeManager.owner()
15+
expect(owner).to.equal(config.$global.governor)
16+
})
17+
1318
it('should set the right arbitrator', async function () {
1419
const arbitrator = await DisputeManager.arbitrator()
1520
expect(arbitrator).to.equal(config.$global.arbitrator)

packages/subgraph-service/test/deployment/SubgraphService.test.ts

+6-4
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ const addressBookEntry = graph.subgraphService!.addressBook.getEntry('SubgraphSe
1010
const SubgraphService = graph.subgraphService!.contracts.SubgraphService
1111

1212
describe('SubgraphService', function () {
13+
it('should be owned by the governor', async function () {
14+
const owner = await SubgraphService.owner()
15+
expect(owner).to.equal(config.$global.governor)
16+
})
17+
1318
it('should set the right minimum provision tokens', async function () {
1419
const [minimumProvisionTokens] = await SubgraphService.getProvisionTokensRange()
1520
expect(minimumProvisionTokens).to.equal(config.SubgraphService.minimumProvisionTokens)
@@ -40,10 +45,7 @@ describe('SubgraphService', function () {
4045
expect(curationAddress).to.equal(config.$global.curationProxyAddress)
4146
})
4247

43-
it('should set the right pause guardian', async function () {
44-
// const pauseGuardian = await SubgraphService.getPauseGuardian()
45-
// expect(pauseGuardian).to.equal(config.$global.pauseGuardian)
46-
})
48+
it('should set the right pause guardian')
4749

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

0 commit comments

Comments
 (0)