-
Notifications
You must be signed in to change notification settings - Fork 794
Reworked all identifier quoting detections #612
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -81,7 +81,15 @@ | |
it 'should fail with an unquotted username with special char' do | ||
expect { | ||
Puppet::Type.type(:mysql_user).new(:name => 'in-valid@localhost', :password_hash => 'pass') | ||
}.to raise_error /Database user in-valid@localhost must be quotted/ | ||
}.to raise_error /Database user in-valid@localhost must be properly quoted, invalid character: '-'/ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can you add a positive test, too? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. braino. sorry. |
||
end | ||
end | ||
|
||
context 'using "misquoted@localhost' do | ||
it 'should fail with a misquoted username is used' do | ||
expect { | ||
Puppet::Type.type(:mysql_user).new(:name => '"misquoted@localhost', :password_hash => 'pass') | ||
}.to raise_error /Invalid database user "misquoted@localhost/ | ||
end | ||
end | ||
end |
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.
host_part
is not used, but I figured someone could eventually do some better checks on it as well.