@@ -138,11 +138,11 @@ func loadKeyValueOperations(path string) (operations []porcupine.Operation, err
138138 if os .IsNotExist (err ) {
139139 return nil , nil
140140 }
141- return nil , fmt .Errorf ("failed to open watch operation file: %q, err: %w" , path , err )
141+ return nil , fmt .Errorf ("failed to open KV operation file: %q, err: %w" , path , err )
142142 }
143143 file , err := os .OpenFile (path , os .O_RDONLY , 0o755 )
144144 if err != nil {
145- return nil , fmt .Errorf ("failed to open watch operation file: %q, err: %w" , path , err )
145+ return nil , fmt .Errorf ("failed to open KV operation file: %q, err: %w" , path , err )
146146 }
147147 defer file .Close ()
148148 decoder := json .NewDecoder (file )
@@ -156,7 +156,7 @@ func loadKeyValueOperations(path string) (operations []porcupine.Operation, err
156156 }
157157 err = decoder .Decode (& operation )
158158 if err != nil {
159- return nil , fmt .Errorf ("failed to decode watch operation, err: %w" , err )
159+ return nil , fmt .Errorf ("failed to decode KV operation, err: %w" , err )
160160 }
161161 operations = append (operations , porcupine.Operation {
162162 ClientId : operation .ClientID ,
@@ -190,15 +190,15 @@ func persistKeyValueOperations(t *testing.T, lg *zap.Logger, path string, operat
190190 lg .Info ("Saving operation history" , zap .String ("path" , path ))
191191 file , err := os .OpenFile (path , os .O_RDWR | os .O_CREATE | os .O_TRUNC , 0o755 )
192192 if err != nil {
193- t .Errorf ("Failed to save operation history: %v" , err )
193+ t .Errorf ("Failed to save KV operation history: %v" , err )
194194 return
195195 }
196196 defer file .Close ()
197197 encoder := json .NewEncoder (file )
198198 for _ , op := range operations {
199199 err := encoder .Encode (op )
200200 if err != nil {
201- t .Errorf ("Failed to encode operation: %v" , err )
201+ t .Errorf ("Failed to encode KV operation: %v" , err )
202202 }
203203 }
204204}
0 commit comments