Skip to content
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

Refactor AgHadr tests #9498

Merged
merged 2 commits into from
Oct 14, 2024
Merged

Refactor AgHadr tests #9498

merged 2 commits into from
Oct 14, 2024

Conversation

andreasjordan
Copy link
Contributor

This PR only changes tests and no code of the module itself.

Currently $script:instance3 is used for Availability Group tests and needs Hadr service setting enabled. This is done for AppVeyor in appveyor.SQL2027.ps1 with $null = Enable-DbaAgHadr -SqlInstance $sqlinstance -Confirm:$false -Force.

So every test can assume that the instance is configured correctly and has to end the test with a correctly configured instance.

Currently we don't see problems in AppVeyor because Disable-DbaAgHadr.Tests.ps1 is run as last test. But to be able to test locally we need to fix this.

@andreasjordan
Copy link
Contributor Author

andreasjordan commented Oct 11, 2024

Test for Get-DbaAgHadr failes because it still runs in the group for $script:instance2, but I think it should run against $script:instance3 together with the related tests.

@niphlod Can you help here?

@andreasjordan
Copy link
Contributor Author

Ok, solved the problem...

@potatoqualitee
Copy link
Member

thank you 🙇🏼

@potatoqualitee potatoqualitee merged commit 6e31300 into development Oct 14, 2024
13 checks passed
@potatoqualitee potatoqualitee deleted the DbaAgHadr_tests branch October 14, 2024 08:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants