Skip to content
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

Support MAX_PER constraint #769

Merged
merged 1 commit into from
Jul 25, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
language: node_js
before_install:
- npm install -g npm
- npm cache clear
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO this should be moved to separate PR. All other PR depends on this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or merged.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pierlo-upitup @aldipower @aquamatthias Can you take a look at this?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @janisz !
Thanx for that! This is merged now.

- npm install -g gulp
node_js:
Expand Down
2 changes: 1 addition & 1 deletion src/js/constants/ValidConstraints.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
const ValidConstraints = ["unique", "like", "unlike", "cluster", "group_by"];
const ValidConstraints = ["unique", "like", "unlike", "cluster", "group_by", "max_per"];

export default Object.freeze(ValidConstraints);
2 changes: 1 addition & 1 deletion src/test/units/AppFormValidators.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ describe("App Form Validators", function () {

it("list of valid constraints", function () {
let constraints =
"hostname:UNIQUE, atomic:LIKE:man, rackid:CLUSTER:rack-1";
"hostname:UNIQUE, atomic:LIKE:man, rackid:CLUSTER:rack-1, dc:max_per:2";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you write max_per in capital letters here? Just for consistency reasons in this test.
Thank you so much.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will do that later on my own. Thx. :)

expect(this.validatior.constraints(constraints)).to.be.true;
constraints =
"rackid:GROUP_BY, atomic:UNLIKE:man";
Expand Down