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

Fix test for Get-DbaEstimatedCompletionTime #9522

Merged
merged 9 commits into from
Oct 20, 2024

Conversation

andreasjordan
Copy link
Contributor

But the test will not work because the databae is too small and CHECKDB is to fast...

@andreasjordan
Copy link
Contributor Author

I think we should skip this test on AppVeyor and only test this command from time to time on a local instance with a big database.

What do you think?

@potatoqualitee
Copy link
Member

Yes, we can skip 👍🏼

@andreasjordan
Copy link
Contributor Author

New idea for those tests: We could use a freely availably database backup for the tests. I refactored the test to use the Stackoverflow database:
https://github.com/BrentOzarULTD/Stack-Overflow-Database/releases/download/20230114/StackOverflowMini.bak

I also changed the BeforeAll to test new variables $script:bigDatabaseBackup and $script:bigDatabaseBackupSourceUrl. We could improve this and download and restore the database in appveyor.SQL2016.ps1 and use it in more tests.

But currently this backup is made with a SQL Server 2022, so it can not be used with the current instance in AppVeyor. So we should disable the test on AppVeyor. Here is a screenshot from the AppVeyor log with the current code:

image

@andreasjordan andreasjordan marked this pull request as ready for review October 20, 2024 12:52
@andreasjordan
Copy link
Contributor Author

@potatoqualitee : If I change pester.groups.p1 here in this branch, this might result in a merge conflict, because the file was changes by a recently merged pull request. Can you merge the current development branche into this branch?

@potatoqualitee
Copy link
Member

Happy to! btw dont worry about my aider branches, I am still working on my prompts and will start with a fresh branch once it's all done and if it takes a bit long, ill copy and rewriite your changes.

@potatoqualitee
Copy link
Member

lgtm!

@potatoqualitee potatoqualitee merged commit 8d4f86f into development Oct 20, 2024
13 checks passed
@potatoqualitee potatoqualitee deleted the GetDbaEstimatedCompletionTime_fix_test branch October 20, 2024 14:22
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