File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed
Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -110,7 +110,8 @@ func splitRefs(cmd *cobra.Command) {
110110 defer writer .Close ()
111111
112112 p := requestPipelineFn (store , false , redundancy .Level (rLevel ))
113- rootRef , err := p (context .Background (), reader )
113+ ctx := redundancy .SetLevelInContext (cmd .Context (), redundancy .Level (rLevel ))
114+ rootRef , err := p (ctx , reader )
114115 if err != nil {
115116 return fmt .Errorf ("pipeline: %w" , err )
116117 }
@@ -200,7 +201,8 @@ func splitChunks(cmd *cobra.Command) {
200201 })
201202
202203 p := requestPipelineFn (store , false , redundancy .Level (rLevel ))
203- rootRef , err := p (context .Background (), reader )
204+ ctx := redundancy .SetLevelInContext (cmd .Context (), redundancy .Level (rLevel ))
205+ rootRef , err := p (ctx , reader )
204206 if err != nil {
205207 return fmt .Errorf ("pipeline: %w" , err )
206208 }
Original file line number Diff line number Diff line change @@ -100,7 +100,8 @@ func TestDBSplitChunks(t *testing.T) {
100100 // split the file manually and compare output with the split commands output.
101101 putter := & putter {chunks : make (map [string ]swarm.Chunk )}
102102 p := requestPipelineFn (putter , false , redundancy .Level (3 ))
103- _ , err = p (context .Background (), bytes .NewReader (buf ))
103+ ctx := redundancy .SetLevelInContext (context .Background (), redundancy .Level (3 ))
104+ _ , err = p (ctx , bytes .NewReader (buf ))
104105 if err != nil {
105106 t .Fatal (err )
106107 }
You can’t perform that action at this time.
0 commit comments