OctopusDeploy / Library

| Public | A repository of step templates and other community-contributed extensions to Octopus Deploy
Other
170 stars 500 forks source link

sql backup db refinement #1497

Closed bcullman closed 6 months ago

bcullman commented 6 months ago

Background

I was concern about what happens when the $RetentionPolicyCount was undefined, so I intended to add a single unit test. While doing so, I recognized that some of my other tests could be improved in quality, uncovering an issue in how files were sorted before choosing which files were deleted.

Additionally, I updated Invoke-PesterTests.ps1 to automatically unpack code under test from the json files so it's a little less annoying.

Results

validated that no action is taken if $RetentionPolicyCount is undefined. treating devices (split backup files) as a single file made pester a little less of a pest

Pre-requisites

bcullman commented 6 months ago

maintainer: (consider squashing commits for cleaner history ;) )

bcullman commented 6 months ago

@twerthi, @ebalders, @harrisonmeister could you take a look?

twerthi commented 6 months ago

Please remove the deprecated function ApplyRetentionPolicy-old

bcullman commented 6 months ago

Please remove the deprecated function ApplyRetentionPolicy-old

ack! thanks @twerthi - nice catch.