-
-
Notifications
You must be signed in to change notification settings - Fork 843
Update tests for Copy-Dba* commands: Only copy from instance2 to instance3 #9838
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
base: development
Are you sure you want to change the base?
Conversation
Frankly I don't get it.
We're using instance names just to split tests between environments on
appveyor and let tests run in parallel.
To execute a full test suite the only thing needed is a VM with two
instances in it.
Il gio 11 set 2025, 18:23 Andreas Jordan ***@***.***> ha
scritto:
… I now have a lab on azure with a domain and a client and two sql servers
to test the Copy-Dba* commands in a better scenario.
I changed the instances that are used in the tests so that we always copy
from instance2 to instance3. This way I only need two instances in that lab.
All Copy-Dba* tests run successful in that lab.
------------------------------
You can view, comment on, or merge this pull request online at:
#9838
Commit Summary
- 73ebc4a
<73ebc4a>
only copy from instance2 to instance3
File Changes
(7 files <https://github.com/dataplat/dbatools/pull/9838/files>)
- *M* tests/Copy-DbaBackupDevice.Tests.ps1
<https://github.com/dataplat/dbatools/pull/9838/files#diff-890a10494c61f3e6267e005322506f08242ef76ed215f9f4064d83e0d3a8c2c0>
(8)
- *M* tests/Copy-DbaDbTableData.Tests.ps1
<https://github.com/dataplat/dbatools/pull/9838/files#diff-bb0a200099078161907ccd2157276ba71ed0a8df050d86ae4d58d6095eaf6702>
(26)
- *M* tests/Copy-DbaDbViewData.Tests.ps1
<https://github.com/dataplat/dbatools/pull/9838/files#diff-2b89051a63030b8df57384d0e71746fe47f37f22542978ff61fb6d4539e4112e>
(26)
- *M* tests/Copy-DbaInstanceTrigger.Tests.ps1
<https://github.com/dataplat/dbatools/pull/9838/files#diff-08e542be1bd6d740ec560d3588f3e170ba888edcaedd3146b5b25354d2128f55>
(8)
- *M* tests/Copy-DbaLogin.Tests.ps1
<https://github.com/dataplat/dbatools/pull/9838/files#diff-d5400ed8f2fad0f9e2491b078220d9206b7cfb5df90fad286ed7a530f99ac835>
(67)
- *M* tests/Copy-DbaRegServer.Tests.ps1
<https://github.com/dataplat/dbatools/pull/9838/files#diff-e3ddc66dd6b90f3650eb0213af96e5524db2e7abc49e3974013aa24002d3b3f4>
(4)
- *M* tests/Copy-DbaSpConfigure.Tests.ps1
<https://github.com/dataplat/dbatools/pull/9838/files#diff-31ad53d7262a19fa279a57a487fe2f751f214dc379d6cf1ebd545350c80feaa3>
(20)
Patch Links:
- https://github.com/dataplat/dbatools/pull/9838.patch
- https://github.com/dataplat/dbatools/pull/9838.diff
—
Reply to this email directly, view it on GitHub
<#9838>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAA52B7C3B2VWMUN36P7ZML3SGOY7AVCNFSM6AAAAACGIIQ5ZSVHI2DSMVQWIX3LMV43ASLTON2WKOZTGQYDOMRVHE3TQNQ>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
$results.Status.Contains('Skipped') | Should -Be $true | ||
$results.Notes.Contains('System login') | Should -Be $true | ||
# Notes is "Local machine name" if ComputerName is different, so we skip the test in this case |
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.
This is the only change that is really needed to support instances on different computers.
@niphlod You are right - this PR is (mostly) useless and I was just to lazy to setup three instances. I commented the only part that is not only about changing the instance to test. I will probably close this in the next days... |
@niphlod on Slack: "The old motto was given dbatools is often used for migration, to test at least the "first" version that is currently out of support (e.g. in order to make sure dbatools works for people having environments to migrate given a version is in the need to be upgraded to a newer one)." My idea: Let's have two more "pointers" to instances in the $TestConfig: We could start with using instance2 (SQL2016) as source and instance3 (SQL2017) as destination. Every test should pass. Then we can change source to instance1 (SQL2008R2) and see if every test works - without changing the test, only the global test configuration. |
I now have a lab on azure with a domain and a client and two sql servers to test the Copy-Dba* commands in a better scenario.
I changed the instances that are used in the tests so that we always copy from instance2 to instance3. This way I only need two instances in that lab.
All Copy-Dba* tests run successful in that lab.