Skip to content

Commit

Permalink
Id or inputspec (#1708)
Browse files Browse the repository at this point in the history
* udpate pkginput to be either ID or pkgInput

Signed-off-by: pxp928 <parth.psu@gmail.com>

* update graphql for id or inputspec for nouns

Signed-off-by: pxp928 <parth.psu@gmail.com>

* update nouns in resolver tests

Signed-off-by: pxp928 <parth.psu@gmail.com>

* update client side graphql

Signed-off-by: pxp928 <parth.psu@gmail.com>

* fix backend testing

Signed-off-by: pxp928 <parth.psu@gmail.com>

* update bulk assembler to pass noun IDs to verbs

Signed-off-by: pxp928 <parth.psu@gmail.com>

* update single assembler to pass noun IDs to verbs

Signed-off-by: pxp928 <parth.psu@gmail.com>

* update neo4j backend - not functional

Signed-off-by: pxp928 <parth.psu@gmail.com>

* update schema comments to account for return IDs in proper order

Signed-off-by: pxp928 <parth.psu@gmail.com>

* delete keyvalue unit tests

Signed-off-by: pxp928 <parth.psu@gmail.com>

* update keyvalue backend with IDorInputSpec

Signed-off-by: pxp928 <parth.psu@gmail.com>

* update ent to use input only

Signed-off-by: pxp928 <parth.psu@gmail.com>

* update arango to use input only

Signed-off-by: pxp928 <parth.psu@gmail.com>

* fix patch planning test

Signed-off-by: pxp928 <parth.psu@gmail.com>

* fix test order

Signed-off-by: pxp928 <parth.psu@gmail.com>

* remove unneeded unit test for arango and ent

Signed-off-by: pxp928 <parth.psu@gmail.com>

* fix lint issues

Signed-off-by: pxp928 <parth.psu@gmail.com>

* fix resolver test

Signed-off-by: pxp928 <parth.psu@gmail.com>

* fix nil slice error for assembler

Signed-off-by: pxp928 <parth.psu@gmail.com>

* add integration tag to backend test suite

Signed-off-by: pxp928 <parth.psu@gmail.com>

* remove -p 1 from the integration tests

Signed-off-by: pxp928 <parth.psu@gmail.com>

* remove TestJsonBz2Ingestion test as it continues to fail

Signed-off-by: pxp928 <parth.psu@gmail.com>

* readd TestJsonBz2Ingestion under integration tests

Signed-off-by: pxp928 <parth.psu@gmail.com>

* move TestJsonBz2Ingestion to processor test where it belongs

Signed-off-by: pxp928 <parth.psu@gmail.com>

---------

Signed-off-by: pxp928 <parth.psu@gmail.com>
  • Loading branch information
pxp928 authored Feb 18, 2024
1 parent d597f9e commit 5fbba0d
Show file tree
Hide file tree
Showing 303 changed files with 5,676 additions and 72,859 deletions.
4 changes: 1 addition & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@ test: generate
# To run it locally you can run the following command: make start-integration-service
.PHONY: integration-test
integration-test: generate check-env
# "-p 1" because We don't want the tests in internal/testing/backend
# and pkg/assembler/backend running at same time
go test -p 1 -tags=integration ./...
go test -tags=integration ./...

# Runs the integration tests locally using docker-compose to start the dependencies and cleans up after itself.
.PHONY: integration-test-local
Expand Down
17 changes: 0 additions & 17 deletions cmd/guacone/cmd/gcs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ package cmd

import (
"testing"

"github.com/spf13/cobra"
)

func TestValidateGCSFlags(t *testing.T) {
Expand Down Expand Up @@ -82,18 +80,3 @@ func TestValidateGCSFlags(t *testing.T) {
}

}

func TestJsonBz2Ingestion(t *testing.T) {
rootCmd := &cobra.Command{
Use: "guacone",
Short: "guacone",
}
rootCmd.AddCommand(collectCmd)
rootCmd.AddCommand(filesCmd)
bz2Path := "./../../../internal/testing/testdata/exampledata/busybox-cyclonedx.json.bz2"
rootCmd.SetArgs([]string{"collect", "files", bz2Path})
err := rootCmd.Execute()
if err != nil {
t.Fatal(err)
}
}
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ require (
deps.dev/api/v3alpha v0.0.0-20240109042716-00b51ef52ece
entgo.io/contrib v0.4.5
entgo.io/ent v0.13.0
github.com/99designs/gqlgen v0.17.41
github.com/99designs/gqlgen v0.17.43
github.com/CycloneDX/cyclonedx-go v0.8.0
github.com/Khan/genqlient v0.6.0
github.com/Masterminds/semver v1.5.0
Expand Down Expand Up @@ -319,7 +319,7 @@ require (
github.com/spf13/viper v1.18.2
github.com/stretchr/testify v1.8.4
github.com/tikv/client-go/v2 v2.0.8-0.20231115083414-7c96dfd783fb
github.com/vektah/gqlparser/v2 v2.5.10
github.com/vektah/gqlparser/v2 v2.5.11
gocloud.dev v0.36.0
gocloud.dev/pubsub/kafkapubsub v0.36.0
gocloud.dev/pubsub/rabbitpubsub v0.36.0
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ entgo.io/contrib v0.4.5 h1:BFaOHwFLE8WZjVJadP0XHCIaxgcC1BAtUvAyw7M/GHk=
entgo.io/contrib v0.4.5/go.mod h1:wpZyq2DJgthugFvDBlaqMXj9mV4/9ebyGEn7xlTVQqE=
entgo.io/ent v0.13.0 h1:DclxWczaCpyiKn6ZWVcJjq1zIKtJ11iNKy+08lNYsJE=
entgo.io/ent v0.13.0/go.mod h1:+oU8oGna69xy29O+g+NEz+/TM7yJDhQQGJfuOWq1pT8=
github.com/99designs/gqlgen v0.17.41 h1:C1/zYMhGVP5TWNCNpmZ9Mb6CqT1Vr5SHEWoTOEJ3v3I=
github.com/99designs/gqlgen v0.17.41/go.mod h1:GQ6SyMhwFbgHR0a8r2Wn8fYgEwPxxmndLFPhU63+cJE=
github.com/99designs/gqlgen v0.17.43 h1:I4SYg6ahjowErAQcHFVKy5EcWuwJ3+Xw9z2fLpuFCPo=
github.com/99designs/gqlgen v0.17.43/go.mod h1:lO0Zjy8MkZgBdv4T1U91x09r0e0WFOdhVUutlQs1Rsc=
github.com/Azure/azure-amqp-common-go/v3 v3.2.3 h1:uDF62mbd9bypXWi19V1bN5NZEO84JqgmI5G73ibAmrk=
github.com/Azure/azure-amqp-common-go/v3 v3.2.3/go.mod h1:7rPmbSfszeovxGfc5fSAXE4ehlXQZHpMja2OtxC2Tas=
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.9.0 h1:fb8kj/Dh4CSwgsOzHeZY4Xh68cFVbzXx+ONXGMY//4w=
Expand Down Expand Up @@ -759,8 +759,8 @@ github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6Kllzaw
github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc=
github.com/vbatts/tar-split v0.11.3 h1:hLFqsOLQ1SsppQNTMpkpPXClLDfC2A3Zgy9OUU+RVck=
github.com/vbatts/tar-split v0.11.3/go.mod h1:9QlHN18E+fEH7RdG+QAJJcuya3rqT7eXSTY7wGrAokY=
github.com/vektah/gqlparser/v2 v2.5.10 h1:6zSM4azXC9u4Nxy5YmdmGu4uKamfwsdKTwp5zsEealU=
github.com/vektah/gqlparser/v2 v2.5.10/go.mod h1:1rCcfwB2ekJofmluGWXMSEnPMZgbxzwj6FaZ/4OT8Cc=
github.com/vektah/gqlparser/v2 v2.5.11 h1:JJxLtXIoN7+3x6MBdtIP59TP1RANnY7pXOaDnADQSf8=
github.com/vektah/gqlparser/v2 v2.5.11/go.mod h1:1rCcfwB2ekJofmluGWXMSEnPMZgbxzwj6FaZ/4OT8Cc=
github.com/vmihailenco/msgpack/v4 v4.3.12/go.mod h1:gborTTJjAo/GWTqqRjrLCn9pgNN+NXzzngzBKDPIqw4=
github.com/vmihailenco/msgpack/v5 v5.3.5 h1:5gO0H1iULLWGhs2H5tbAHIZTV8/cYafcFOr9znI5mJU=
github.com/vmihailenco/msgpack/v5 v5.3.5/go.mod h1:7xyJ9e+0+9SaZT0Wt1RGleJXzli6Q/V5KbhBonMG9jc=
Expand Down
2 changes: 1 addition & 1 deletion internal/testing/backend/artifact_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ func TestArtifacts(t *testing.T) {
}}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
ingestedArtID, err := b.IngestArtifact(ctx, tt.artifactInput)
ingestedArtID, err := b.IngestArtifact(ctx, &model.IDorArtifactInput{ArtifactInput: tt.artifactInput})
if (err != nil) != tt.wantErr {
t.Errorf("arangoClient.IngestArtifact() error = %v, wantErr %v", err, tt.wantErr)
return
Expand Down
2 changes: 1 addition & 1 deletion internal/testing/backend/builder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ func TestBuilders(t *testing.T) {
}}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
ingestedBuilderID, err := b.IngestBuilder(ctx, tt.builderInput)
ingestedBuilderID, err := b.IngestBuilder(ctx, &model.IDorBuilderInput{BuilderInput: tt.builderInput})
if (err != nil) != tt.wantErr {
t.Errorf("arangoClient.IngestBuilder() error = %v, wantErr %v", err, tt.wantErr)
return
Expand Down
Loading

0 comments on commit 5fbba0d

Please sign in to comment.