-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improved user validation and munging
We want to make sure we are validating the entire user parameter (and validating it consistently between mysql_user and mysql_grant). Additionally, for munging we do not want to do anything that could truncate the username.
- Loading branch information
Morgan Haskel
committed
Sep 18, 2015
1 parent
1d82477
commit 542c43e
Showing
3 changed files
with
20 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -51,6 +51,16 @@ | |
end | ||
end | ||
|
||
context 'using [email protected]/255.255.255.0' do | ||
before :each do | ||
@user = Puppet::Type.type(:mysql_user).new(:name => '[email protected]/255.255.255.0', :password_hash => 'pass') | ||
end | ||
|
||
it 'should create the user with the netmask' do | ||
expect(@user[:name]).to eq('[email protected]/255.255.255.0') | ||
end | ||
end | ||
|
||
context 'using allo_wed$char@localhost' do | ||
before :each do | ||
@user = Puppet::Type.type(:mysql_user).new(:name => 'allo_wed$char@localhost', :password_hash => 'pass') | ||
|