@@ -284,6 +284,7 @@ func TestCloneStoredMetadataForFork_DeepCopiesReferenceFields(t *testing.T) {
284284 stoppedAt := time .Now ().Add (- 1 * time .Minute )
285285 pid := 1234
286286 exitCode := 17
287+ compressionLevel := 5
287288
288289 src := StoredMetadata {
289290 Env : map [string ]string {"A" : "1" },
@@ -302,6 +303,13 @@ func TestCloneStoredMetadataForFork_DeepCopiesReferenceFields(t *testing.T) {
302303 IgnoreSourceCIDRs : []string {"10.0.0.0/8" },
303304 IgnoreDestinationPorts : []uint16 {22 },
304305 },
306+ SnapshotPolicy : & SnapshotPolicy {
307+ Compression : & snapshotstore.SnapshotCompressionConfig {
308+ Enabled : true ,
309+ Algorithm : snapshotstore .SnapshotCompressionAlgorithmZstd ,
310+ Level : & compressionLevel ,
311+ },
312+ },
305313 }
306314
307315 cloned := cloneStoredMetadata (src )
@@ -317,6 +325,7 @@ func TestCloneStoredMetadataForFork_DeepCopiesReferenceFields(t *testing.T) {
317325 * cloned .ExitCode = 42
318326 cloned .AutoStandby .IgnoreSourceCIDRs [0 ] = "192.168.0.0/16"
319327 cloned .AutoStandby .IgnoreDestinationPorts [0 ] = 443
328+ * cloned .SnapshotPolicy .Compression .Level = 9
320329 now := time .Now ()
321330 * cloned .StartedAt = now
322331 * cloned .StoppedAt = now
@@ -331,6 +340,7 @@ func TestCloneStoredMetadataForFork_DeepCopiesReferenceFields(t *testing.T) {
331340 require .Equal (t , 17 , * src .ExitCode )
332341 require .Equal (t , "10.0.0.0/8" , src .AutoStandby .IgnoreSourceCIDRs [0 ])
333342 require .Equal (t , uint16 (22 ), src .AutoStandby .IgnoreDestinationPorts [0 ])
343+ require .Equal (t , 5 , * src .SnapshotPolicy .Compression .Level )
334344 require .Equal (t , startedAt , * src .StartedAt )
335345 require .Equal (t , stoppedAt , * src .StoppedAt )
336346}
0 commit comments