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

Fixes #20444 - Add validations for uniqueness content title #291

Merged
merged 1 commit into from Nov 7, 2017

Conversation

shiramax
Copy link
Contributor

No description provided.

@xprazak2
Copy link
Contributor

[test]

@ares
Copy link
Member

ares commented Sep 25, 2017

Tests won't run until we get master tests stable

@xprazak2
Copy link
Contributor

@shiramax: I think you'll need to make a change in the factory, something like:

f.sequence(:title) { |n| "scap_content_title_#{n}" }

could work.

@shiramax
Copy link
Contributor Author

@xprazak2 Done, I also added migrations for the title uniqueness.

@xprazak2
Copy link
Contributor

[test]

@ares
Copy link
Member

ares commented Oct 17, 2017

Failures seems to be caused by new rails 5 migration syntax. Migration[5.0] does not seem to work, should the 5.0 tag be removed?

@shiramax
Copy link
Contributor Author

@ares Done.

@xprazak2
Copy link
Contributor

[test]

1 similar comment
@shiramax
Copy link
Contributor Author

[test]

@xprazak2
Copy link
Contributor

The migration error is probably not intermittent, when I looked at my db, I got:

the table was renamed in the past but the index names were not, that seems to cause the migration to fail now. I would try to get the index name from table and then remove it by name.

Copy link

@houndci-bot houndci-bot left a comment

Choose a reason for hiding this comment

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

Some files could not be reviewed due to errors:

.rubocop.yml: Style/FileName has the wrong namespace - should be Naming
.rubocop.yml: Style/FileName has the wrong namespace - should be Naming
.rubocop.yml: Style/PredicateName has the wrong namespace - should be Naming
.rubocop.yml: Style/AccessorMethodName has the wrong namespace - should be Naming
.rubocop.yml: Style/AlignArray has the wrong namespace - should be Layout
.rubocop.yml: Style/AlignHash has the wrong namespace - should be Layout
.rubocop.yml: Style/AlignParameters has the wrong namespace - should be Layout
.rubocop.yml: Style/EmptyLines has the wrong namespace - should be Layout
.rubocop.yml: Style/EmptyLinesAroundAccessModifier has the wrong namespace - should be Layout
.rubocop.yml: Style/EmptyLinesAroundBlockBody has the wrong namespace - should be Layout
.rubocop.yml: Style/EmptyLinesAroundClassBody has the wrong namespace - should be Layout
.rubocop.yml: Style/EmptyLinesAroundModuleBody has the wrong namespace - should be Layout
.rubocop.yml: Style/LeadingCommentSpace has the wrong namespace - should be Layout
.rubocop.yml: Style/MultilineOperationIndentation has the wrong namespace - should be Layout
.rubocop.yml: Style/SpaceAfterComma has the wrong namespace - should be Layout
.rubocop.yml: Style/SpaceAroundOperators has the wrong namespace - should be Layout
.rubocop.yml: Style/SpaceInsideHashLiteralBraces has the wrong namespace - should be Layout
.rubocop.yml: Style/SpaceInsideBrackets has the wrong namespace - should be Layout
.rubocop.yml: Style/VariableNumber has the wrong namespace - should be Naming
.rubocop.yml: Style/DotPosition has the wrong namespace - should be Layout
Warning: unrecognized cop Lint/LiteralInCondition found in .rubocop.yml
Error: Unsupported Ruby version 2.0 found in `TargetRubyVersion` parameter (in .rubocop.yml). 2.0-compatible analysis was dropped after version 0.50.
Supported versions: 2.1, 2.2, 2.3, 2.4

@xprazak2
Copy link
Contributor

[test]

1 similar comment
@shiramax
Copy link
Contributor Author

[test]

Copy link

@houndci-bot houndci-bot left a comment

Choose a reason for hiding this comment

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

Some files could not be reviewed due to errors:

.rubocop.yml: Style/FileName has the wrong namespace - should be Naming
.rubocop.yml: Style/FileName has the wrong namespace - should be Naming
.rubocop.yml: Style/PredicateName has the wrong namespace - should be Naming
.rubocop.yml: Style/AccessorMethodName has the wrong namespace - should be Naming
.rubocop.yml: Style/AlignArray has the wrong namespace - should be Layout
.rubocop.yml: Style/AlignHash has the wrong namespace - should be Layout
.rubocop.yml: Style/AlignParameters has the wrong namespace - should be Layout
.rubocop.yml: Style/EmptyLines has the wrong namespace - should be Layout
.rubocop.yml: Style/EmptyLinesAroundAccessModifier has the wrong namespace - should be Layout
.rubocop.yml: Style/EmptyLinesAroundBlockBody has the wrong namespace - should be Layout
.rubocop.yml: Style/EmptyLinesAroundClassBody has the wrong namespace - should be Layout
.rubocop.yml: Style/EmptyLinesAroundModuleBody has the wrong namespace - should be Layout
.rubocop.yml: Style/LeadingCommentSpace has the wrong namespace - should be Layout
.rubocop.yml: Style/MultilineOperationIndentation has the wrong namespace - should be Layout
.rubocop.yml: Style/SpaceAfterComma has the wrong namespace - should be Layout
.rubocop.yml: Style/SpaceAroundOperators has the wrong namespace - should be Layout
.rubocop.yml: Style/SpaceInsideHashLiteralBraces has the wrong namespace - should be Layout
.rubocop.yml: Style/SpaceInsideBrackets has the wrong namespace - should be Layout
.rubocop.yml: Style/VariableNumber has the wrong namespace - should be Naming
.rubocop.yml: Style/DotPosition has the wrong namespace - should be Layout
Warning: unrecognized cop Lint/LiteralInCondition found in .rubocop.yml
Error: Unsupported Ruby version 2.0 found in `TargetRubyVersion` parameter (in .rubocop.yml). 2.0-compatible analysis was dropped after version 0.50.
Supported versions: 2.1, 2.2, 2.3, 2.4

@xprazak2
Copy link
Contributor

xprazak2 commented Nov 6, 2017

[test]

@ares
Copy link
Member

ares commented Nov 7, 2017

Test failures unrelated, LGTM. Leaving for @xprazak2 to finish the proper review that he started :-)

@xprazak2
Copy link
Contributor

xprazak2 commented Nov 7, 2017

Test failure is indeed unrelated, migrations no longer fail. I think we are good here. Thanks @shiramax!

@xprazak2 xprazak2 merged commit 640add2 into theforeman:master Nov 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants