(MODULES-3240) Fix rspec-puppet incompatibility
Removed creating the 'scope' variable as it is already available via rspec-puppet. Without removing this statement, unit tests will fail on rspec-puppet 2.4.0, and probably subsequent versions as well.
Merge pull request #162 from glennsarti/ticket/stable/MODULES-3240-fi…
…x-rspec-puppet-issue (MODULES-3240) Fix rspec-puppet incompatibility
Merge branch 'master' into stable
* master: (MODULES-3240) Fix rspec-puppet incompatibility
Merge pull request #163 from glennsarti/stable
(maint) modsync update - stable
Merge pull request #165 from ferventcoder/master
Merge up to master from stable after modsync changes
(MODULES-3355) Fix Role Name Collisions
If sqlserver::role is specified more than one for the same role
non-unique titles will be generated for the sqlserver_tsql that
will handle the operations. This is likely to happen if setting
up heira configs like this:
'sqlserver::role':
‘User_1’:
role: db_owner
database: FooBar
instance: MSSQLSERVER
members:
- ‘User_1’
type: 'DATABASE'
‘User_2’:
role: db_owner
database: Wakka
instance: MSSQLSERVER
members:
- ‘User_2’
type: 'DATABASE'
This fix introduces the database name into the title created for
the sqlserver_tsql statements so that it is unique.(doc)(MODULES-3356) Branding Name Change
Update all references from puppetlabs to puppet
Merge pull request #167 from jpogran/ticket/master/MODULES-3355-fix-r…
…ole-name-collisions (MODULES-3355) Fix Role Name Collisions
Merge pull request #168 from jpogran/ticket/stable/MODULES-3356-brand…
…ing-name-change (MODULES-3356) Branding Name Change
* stable: (doc)(MODULES-3356) Branding Name Change
(MODULES-3355) Fix acceptance tests for Sqlserver role
Commit 2f18a68 fixes sqlserver::role to allow multiple role declarations for the same role name. This introduced a bug by not changing the sqlserver_tsql title in the require paramter for sqlserver::role::permissions. This only occurs when permissions are specified. This fixes acceptance tests by ensuring the require statement for the role permissions is the same as the tile for the tsql statement
Merge pull request #169 from jpogran/ticket/master/MODULES-3355-fix-r…
…ole-name-collisions-and-acceptance (MODULES-3355) Fix acceptance tests for Sqlserver role
Merge pull request #171 from Iristyle/maint/stable/whitespace-cleanup
(maint) remove trailing README whitespace
Merge remote-tracking branch 'origin/stable'
* origin/stable: (maint) remove trailing README whitespace
[stable] Adding more advanced example for SQL Server
Adding more advanced example for SQL Server. This time in Stable.
Revert "[stable] Adding more advanced example for SQL Server"
This reverts commit 5f8df8e.
[stable] Adding more advanced example for SQL Server
Adding more advanced example for SQL Server. This time in Stable.
* stable: [stable] Adding more advanced example for SQL Server
(maint) Remove unused TSQL provider run_check
- This method only appears in tests
(maint) Clean SqlConnection.open_and_run_command
- Minor refactor to make the return value more obvious
(maint) Remove TSQL provider run_update
- This method is extraneous / confusing. Better to refactor all code to execute with the providers `run` method
(FM-5324) Fix TSQL error propagation
- Introduce a minor refactor so that the `returns` property captures errors properly from TSQL executions. Previously, if a `refresh` occurred against a sqlserver_tsql the output would cause a failure, but simply executing TSQL would not do the same. Follow the same model as the Puppet exec type (where much of this code comes from), and have `refresh` trigger the `sync` method of the `results` property, so that the code is now shared.
(maint) Simplify SqlConnection#command
- The command method for SqlConnection only has a single caller, the block form is never used and the result is not either. Furthermore, the caller open_and_run_command, already catches win32_exception, so there's more code here than necessary.
(maint) Remove SqlConnection#command
- The existing code only has one code path, so remove the unneeded method.
(maint) Make SqlConnection state tests explicit
- Tests should be better (self) documented
(maint) Loosen regex restriction on SQL error
- Properly parse errors that look like: SQL Server error message instead of those that must have whitespace like: SQL Server error message
(maint) Simplify SqlConnection error handling
- The existing SqlConnection class has a public property exception_caught, which is not used. Further, it uses this value to save off exceptions inside the class, rather than simply returning the parsed errors when open_and_run_command is executed, which is presently the only caller that ever looks at the error values. This provides an opportunity to simplify the code paths, and remove unnecessary caching of errors and the 2 unnecessary methods has_errors and error_message from the SqlConnection class. Instead, directly return a new ResultOutput instance as soon as SQL code is executed. Tests are modified accordingly.
(FM-5324) Emit debug output on failed onlyif TSQL
- Previously, there was no way of getting the log output from SQL Server when executing TSQL during an onlyif. Only the status code was emitted, which is not helpful when trying to debug.
(maint) Fix SqlConnection connection string tests
- These tests were previously stubbing return values instead of asserting that the code was behaving properly.
Merge pull request #173 from Iristyle/maint/sqlconnection-refactor
(FM-5324) Fix TSQL error propagation
(PE-16132) Add Windows Based Authentication for sqlserver::config
Previously to use classes such as sqlserver::login, it would use the sqlserver::config resource which would contain the credentials to conect to the database. However this resource could only authenticate using SQL Server based authenctiation. This means that databases that only used Windows based authentication could not be managed. This commit modifies the sqlserver::config class with an additional property called login_type which can be either SQL_LOGIN or WINDOWS_LOGIN, with a default of SQL_LOGIN. The login type also determines the validity of the admin_user and admin_pass properties. The config resource properties are consumed by the get_connection_string method in sql_connection. The login_type property then determines whether 'Integrated Security=SSPI' is appended the connection string for connecting to the database. Additional the spec, define and acceptance tests are modified for the new properties and default values.
Merge pull request #174 from glennsarti/ticket/master/PE-16132-enable…
…-windows-auth (PE-16132) Add Windows Based Authentication for sqlserver::config
(FM-5387) Remove simplecov gem
FM-5387 simplified the windows CI pipeline complexity however an issue was found in ths SQL Server module. The simplecov gem is used to generate code coverage metrics however the results aren't actually used anywhere. Also this gem depends on json with native extensions which is causing CI failures due to lack of devkit. This commit removes the simplecov gem and removes the references in the spec_helper.
(maint) Remove redundant settings in sync.yml
The sync.yml file specifies gems in the development and system_tests groups which are merely duplicates of the defaults. This commit changes the gem specification to make yard an optional gem which is appended the required defaults
Module updated with latest modsync and sync.yml settings
(maint) Update lint tests for puppet-lint 2.0
Puppet-lint 2.0 has a breaking change where the line length test has two names. This commit adds both line length tests to be exempted.
Merge pull request #175 from glennsarti/ticket/maint/remove-simplecov…
…-gem (FM-5387) Remove simplecov gem and update for modsync
(maint) Update rakefile for puppetlabs_spec_helper
The rakefile is attempting to override the default puppet lint settings however these settings are more permissive than the defaults and are causing false lint failures e.g. the vendor directory is not excluded in thie Rakefile but the puppetlabs_spec_helper does this by default. This commit removes the ignore_paths setting as the spec helper already does this. Also added a comment that the 80 and 140 char rule changes can be removed once next version of spec_helper is released as they are already the defaults.
Merge pull request #176 from glennsarti/ticket/maint/remove-simplecov…
…-gem (maint) Update rakefile for puppetlabs_spec_helper
* stable: (maint) Update rakefile for puppetlabs_spec_helper (maint) Update lint tests for puppet-lint 2.0 (maint) modsync update (maint) Remove redundant settings in sync.yml (FM-5387) Remove simplecov gem
Module updated with lastest modsync settings
Merge pull request #177 from glennsarti/ticket/stable/modules-3536
(MODULES-3536) modsync update
Merge remote-tracking branch 'origin/master' into stable
* origin/master: (PE-16132) Add Windows Based Authentication for sqlserver::config (maint) Fix SqlConnection connection string tests (FM-5324) Emit debug output on failed onlyif TSQL (maint) Simplify SqlConnection error handling (maint) Loosen regex restriction on SQL error (maint) Make SqlConnection state tests explicit (maint) Remove SqlConnection#command (maint) Simplify SqlConnection#command (FM-5324) Fix TSQL error propagation (maint) Remove TSQL provider run_update (maint) Clean SqlConnection.open_and_run_command (maint) Remove unused TSQL provider run_check Revert "[stable] Adding more advanced example for SQL Server" [stable] Adding more advanced example for SQL Server (MODULES-3355) Fix acceptance tests for Sqlserver role (MODULES-3355) Fix Role Name Collisions
This commit prepares the stable branch for module release 1.1.3. [ci skip]