-
Notifications
You must be signed in to change notification settings - Fork 112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve adding domains #268
Conversation
test/meta-colony.js
Outdated
@@ -283,8 +283,8 @@ contract("Meta Colony", accounts => { | |||
}); | |||
|
|||
it("should NOT be able to add a child local skill more than one level from the root local skill", async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test description should probably talk about domains rather than skills now.
contracts/Colony.sol
Outdated
auth | ||
localSkill(_parentSkillId) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't need it now because of the require(_parentDomainId == 1, "colony-parent-skill-not-root");
, but worth throwing in the domainExists
modifier here now to save us forgetting to in the future?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this wasn't a breaking change for us in the future I didn't think to include it but it doesn't hurt to be future-proof.
test/meta-colony.js
Outdated
@@ -343,25 +343,6 @@ contract("Meta Colony", accounts => { | |||
assert.equal(rootSkillChild3.toNumber(), 6); | |||
}); | |||
|
|||
it("should NOT be able to add a child local skill more than one level from the root local skill", async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why delete these tests?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should NOT be able to add a child local skill more than one level from the root local skill
is already covered byshould NOT be able to add a child domain more than one level away from the root domain
should NOT be able to add a child local skill to a global skill parent
- is no longer relevant. Passing in a domain id in and creating the local skills within the same call ensures we cannot add a domain against a global skill
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was actually tempted to merge the when adding domains in the meta colony
and when adding domains in a regular colony
as there is nothing special in the meta colony setup as far as domains are concerned. What do you think?
0abbdad
to
922e231
Compare
922e231
to
b827071
Compare
f9419dc
to
f407a66
Compare
as opposed to local skill id
f407a66
to
965ce4d
Compare
Closes #266
Also fixes a test issue using invalid skill id https://github.com/JoinColony/colonyNetwork/blob/develop/test/meta-colony.js#L372