Share artifact dependency queries across consumers
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package artifactdeps
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"reflect"
|
||||
"testing"
|
||||
@@ -18,6 +19,10 @@ func TestGraphQueries(t *testing.T) {
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
serialized, err := json.Marshal(g.Dependencies("root"))
|
||||
if err != nil || string(serialized) != "[]" {
|
||||
t.Fatalf("empty dependency JSON = %s, %v", serialized, err)
|
||||
}
|
||||
wantOrder := []string{"other", "root", "left", "right", "end"}
|
||||
if got := g.Order(); !reflect.DeepEqual(got, wantOrder) {
|
||||
t.Fatalf("order = %v", got)
|
||||
|
||||
Reference in New Issue
Block a user