Skip to content

Commit

Permalink
Add final patch "add" operation support
Browse files Browse the repository at this point in the history
Signed-off-by: Matt Rutkowski <[email protected]>
  • Loading branch information
mrutkows committed Jan 15, 2024
1 parent 7884d1f commit b91b295
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions cmd/patch_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ package cmd
import (
"bufio"
"bytes"
"fmt"
"io"
"log"
"os"
Expand Down Expand Up @@ -225,7 +224,7 @@ func TestPatchCdx15(t *testing.T) {
if err != nil {
t.Error(err)
}
fmt.Printf("%s\n", buffer.String())
getLogger().Tracef("%s\n", buffer.String())
}

func TestPatchCdx15SliceAdd(t *testing.T) {
Expand All @@ -235,7 +234,7 @@ func TestPatchCdx15SliceAdd(t *testing.T) {
if err != nil {
t.Error(err)
}
fmt.Printf("%s\n", buffer.String())
getLogger().Tracef("%s\n", buffer.String())
}

// func TestPatchRFC6902AppendixA2(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion test/patch/cdx-patch-metadata-properties-1.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[
{ "op": "add", "path": "/metadata/properties/-", "value": { "name": "foo", "value": "bar" } },
{ "op": "add", "path": "/metadata/properties/1", "value": { "name": "rush", "value": "yyz" } },
{ "op": "add", "path": "/version", "value": 1 },
{ "op": "add", "path": "/version", "value": 2 },
{ "op": "add", "path": "/modified", "value": true }
]

0 comments on commit b91b295

Please sign in to comment.