Install-DbaMaintenanceSolution: adds tests for defaults reported by documentation, some failing#10184
Open
ReeceGoding wants to merge 1 commit intodataplat:developmentfrom
Open
Install-DbaMaintenanceSolution: adds tests for defaults reported by documentation, some failing#10184ReeceGoding wants to merge 1 commit intodataplat:developmentfrom
ReeceGoding wants to merge 1 commit intodataplat:developmentfrom
Conversation
Although a lot of tests are added here, the bottom line is that this adds four failing tests. The four that fail check that we have the following documentation-claimed behaviors: * When `-Verify` is not specified, we should enable verify. * When `-Checksum` is not specified, but the instance has it on by default, we should enable it in the job. * When `-Checksum` is not specified, but the instance has it off by default, we should enable it in the job. * When `-Compress` is not specified, but the instance has it on by default, we should enable it in the job. We can fix these once we agree how. **Somebody will have to tell me how we want this done**. Most of this is mentioned in dataplat#10183. This adds a test context for "Defaults for unspecified parameters are as documentation says", including three tests * "Should have Verify parameter set to Y in backup jobs", which fails as dataplat#10183 predicts * "Should have StartTime set to 011500 in backup schedule", which passes * "Should have BackupLocation parameter set to instance default in backup jobs", which passes. The "Checksum tests when instance defaults to checksum on" and "Checksum tests when instance defaults to checksum off" contexts are expanded to test for `-CheckSum` on, off, and not specified. To accommodate this, we now uninstall the maintenance solution after each test in these contexts. In both contexts, only the "not specified" test fails. This is as dataplat#10183 predicts. Similarly, the two contexts "Compression tests when instance defaults to compression on" and "Compression tests when instance defaults to compression off" have been added and they test for `-Compress` on, off, and not specified. Among these, only the test where compression is turned on by default for the instance but not specified in the install command fails.
Collaborator
|
I think:
|
Collaborator
|
I am not a fan of useing three states of a switch "$true / $false / not used" as it makes things like |
Contributor
Author
|
Let's discuss on the issue's page. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds many tests for #10183. Four of these fail.
The Important Parts
Although a lot of tests are added here, the bottom line is that this adds four failing tests. The four that fail check that we have the following documentation-claimed behaviors:
-Verifyis not specified, we should enable verify.-Checksumis not specified, but the instance has it on by default, we should enable it in the job.-Checksumis not specified, but the instance has it off by default, we should enable it in the job.-Compressis not specified, but the instance has it on by default, we should enable it in the job.We can fix these once we agree how. Somebody will have to tell me how we want this done. Most of this is mentioned in #10183.
Full Details
This adds a test context for "Defaults for unspecified parameters are as documentation says", including three tests:
The "Checksum tests when instance defaults to checksum on" and "Checksum tests when instance defaults to checksum off" contexts are expanded to test for
-CheckSumon, off, and not specified. To accommodate this, we now uninstall the maintenance solution after each test in these contexts. In both contexts, only the "not specified" test fails. This is as #10183 predicts.Similarly, the two contexts "Compression tests when instance defaults to compression on" and "Compression tests when instance defaults to compression off" have been added and they test for
-Compresson, off, and not specified. Among these, only the test where compression is turned on by default for the instance but not specified in the install command fails.Type of Change
Invoke-ManualPester)