Closed sameer closed 11 months ago
So I added a lobj
branch to the mock git repo with a file large enough to generate a lobj that would hit my changes on a push. However, IpnsHandler.Push()
is not called because the testing never does an actual push. I will try to add a push test.
Edit: I misspoke, there is a push test, but the large object does not get sent because it's pushing refs/heads/master
.
Discovered that the push tests were never actually run because there was a missing newline at the end of testCase(t, args, "push refs/heads/master:refs/heads/master\n", []string{})
.
Jenkins is broken in ipfs-shipyard
for go projects, I'll try to work around it tomorrow if time permits
Looks like macOS is still failing:
[git-remote-ipld] Running shell script
+ go test -v ./...
+ tee output
/var/jenkins/workspace/pyard_git-remote-ipld_PR-21-BEUY3MIKEUQKTXCLQUO4RZM773OQDB3XCGN6CAIWBSB6ADFZOXKQ/src/github.com/ipfs shipyard/git-remote-ipld/cmd/git-remote-ipld/ipld.go:15:2: cannot find package "github.com/ipfs-shipyard/git-remote-ipld/core" in any of:
/var/jenkins/tools/org.jenkinsci.plugins.golang.GolangInstallation/1.11/src/github.com/ipfs-shipyard/git-remote-ipld/core (from $GOROOT)
/var/jenkins/workspace/pyard_git-remote-ipld_PR-21-BEUY3MIKEUQKTXCLQUO4RZM773OQDB3XCGN6CAIWBSB6ADFZOXKQ/src/github.com/ipfs-shipyard/git-remote-ipld/core (from $GOPATH)
This PR fixes #12 by splitting large objects into a header and raw data which are individually hashed then patched together for the lobj hash. I kept a fallback to just adding the entire object if the header can't be found.
I ran it against a repo, one 3.6MB lobj example is:
Not exactly sure how to add tests for this -- any guidance is appreciated.
Edit: tests seem to fail on macOS but I think it's unrelated.