OctopusDeploy / Library

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

sql backup db refinement #1497

Closed bcullman closed 8 months ago

bcullman commented 8 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 8 months ago

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

bcullman commented 8 months ago

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

twerthi commented 8 months ago

Please remove the deprecated function ApplyRetentionPolicy-old

bcullman commented 8 months ago

Please remove the deprecated function ApplyRetentionPolicy-old

ack! thanks @twerthi - nice catch.