Skip to content

Commit

Permalink
chore: update files after the rename
Browse files Browse the repository at this point in the history
  • Loading branch information
galargh committed Mar 17, 2023
1 parent 3b5bf98 commit aaa57f9
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 15 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ COPY ./go.mod ./go.sum ./
RUN go mod download

COPY . .
RUN go build -o ./gateway-conformance ./entrypoint.go
RUN go build -o ./gateway-conformance ./cmd/gateway-conformance

ENTRYPOINT ["/app/gateway-conformance"]
5 changes: 1 addition & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,12 @@ provision-kubo:
test-kubo: provision-kubo
GATEWAY_URL=http://127.0.0.1:8080 make _test

merge-fixtures:
go build -o merge-fixtures ./tooling/cmd/merge_fixtures.go

# tools
fixtures.car: gateway-conformance
./gateway-conformance extract-fixtures --merged=true --dir=.

gateway-conformance:
go build -o ./gateway-conformance ./entrypoint.go
go build -o ./gateway-conformance ./cmd/gateway-conformance

_test: fixtures.car gateway-conformance
./gateway-conformance test --json output.json --gateway-url ${GATEWAY_URL}
Expand Down
4 changes: 2 additions & 2 deletions cmd/gateway-conformance/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"strings"

"github.com/ipfs/gateway-conformance/tooling"
"github.com/ipfs/gateway-conformance/tooling/cmd"
"github.com/ipfs/gateway-conformance/tooling/car"
"github.com/ipfs/gateway-conformance/tooling/fixtures"
"github.com/urfave/cli/v2"
)
Expand Down Expand Up @@ -171,7 +171,7 @@ func main() {

merged := cCtx.Bool("merged")
if merged {
err = cmd.Merge(filepath.Join(directory, "fixtures.car"))
err = car.Merge(files, filepath.Join(directory, "fixtures.car"))
if err != nil {
return err
}
Expand Down
10 changes: 2 additions & 8 deletions tooling/car/merge.go
Original file line number Diff line number Diff line change
@@ -1,20 +1,14 @@
package cmd
package car

import (
"context"
"fmt"

"github.com/ipfs/gateway-conformance/tooling/fixtures"
"github.com/ipfs/go-cid"
"github.com/ipld/go-car/v2/blockstore"
)

func Merge(outputPath string) error {
inputPaths, err := fixtures.List()
if err != nil {
return err
}

func Merge(inputPaths []string, outputPath string) error {
// First list all the roots in our fixtures
roots := make([]cid.Cid, 0)

Expand Down

0 comments on commit aaa57f9

Please sign in to comment.