73 lines
2.8 KiB
Diff
73 lines
2.8 KiB
Diff
From 736c749ed730a1cc2f4c12f34de06ae9810ebe86 Mon Sep 17 00:00:00 2001
|
|
From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
|
|
Date: Tue, 15 Jan 2019 01:08:23 -0500
|
|
Subject: [PATCH 1/2] Backport PR 3377 to fix test server.
|
|
|
|
Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
|
|
---
|
|
t/git-lfs-test-server-api/main.go | 13 +++++++------
|
|
t/git-lfs-test-server-api/testupload.go | 2 +-
|
|
2 files changed, 8 insertions(+), 7 deletions(-)
|
|
|
|
diff --git a/t/git-lfs-test-server-api/main.go b/t/git-lfs-test-server-api/main.go
|
|
index 3635df76..25a1e8ab 100644
|
|
--- a/t/git-lfs-test-server-api/main.go
|
|
+++ b/t/git-lfs-test-server-api/main.go
|
|
@@ -13,6 +13,7 @@ import (
|
|
"github.com/git-lfs/git-lfs/errors"
|
|
"github.com/git-lfs/git-lfs/fs"
|
|
"github.com/git-lfs/git-lfs/lfsapi"
|
|
+ "github.com/git-lfs/git-lfs/lfshttp"
|
|
t "github.com/git-lfs/git-lfs/t/cmd/util"
|
|
"github.com/git-lfs/git-lfs/tasklog"
|
|
"github.com/git-lfs/git-lfs/tq"
|
|
@@ -141,7 +142,7 @@ func buildManifest(r *t.Repo) (*tq.Manifest, error) {
|
|
// Configure the endpoint manually
|
|
finder := lfsapi.NewEndpointFinder(r)
|
|
|
|
- var endp lfsapi.Endpoint
|
|
+ var endp lfshttp.Endpoint
|
|
if len(cloneUrl) > 0 {
|
|
endp = finder.NewEndpointFromCloneURL(cloneUrl)
|
|
} else {
|
|
@@ -160,18 +161,18 @@ func buildManifest(r *t.Repo) (*tq.Manifest, error) {
|
|
}
|
|
|
|
type constantEndpoint struct {
|
|
- e lfsapi.Endpoint
|
|
+ e lfshttp.Endpoint
|
|
|
|
lfsapi.EndpointFinder
|
|
}
|
|
|
|
-func (c *constantEndpoint) NewEndpointFromCloneURL(rawurl string) lfsapi.Endpoint { return c.e }
|
|
+func (c *constantEndpoint) NewEndpointFromCloneURL(rawurl string) lfshttp.Endpoint { return c.e }
|
|
|
|
-func (c *constantEndpoint) NewEndpoint(rawurl string) lfsapi.Endpoint { return c.e }
|
|
+func (c *constantEndpoint) NewEndpoint(rawurl string) lfshttp.Endpoint { return c.e }
|
|
|
|
-func (c *constantEndpoint) Endpoint(operation, remote string) lfsapi.Endpoint { return c.e }
|
|
+func (c *constantEndpoint) Endpoint(operation, remote string) lfshttp.Endpoint { return c.e }
|
|
|
|
-func (c *constantEndpoint) RemoteEndpoint(operation, remote string) lfsapi.Endpoint { return c.e }
|
|
+func (c *constantEndpoint) RemoteEndpoint(operation, remote string) lfshttp.Endpoint { return c.e }
|
|
|
|
func buildTestData(repo *t.Repo, manifest *tq.Manifest) (oidsExist, oidsMissing []TestObject, err error) {
|
|
const oidCount = 50
|
|
diff --git a/t/git-lfs-test-server-api/testupload.go b/t/git-lfs-test-server-api/testupload.go
|
|
index dde5e9ec..3bdbd4ba 100644
|
|
--- a/t/git-lfs-test-server-api/testupload.go
|
|
+++ b/t/git-lfs-test-server-api/testupload.go
|
|
@@ -52,7 +52,7 @@ func uploadAllExists(manifest *tq.Manifest, oidsExist, oidsMissing []TestObject)
|
|
var errbuf bytes.Buffer
|
|
for _, o := range retobjs {
|
|
link, _ := o.Rel("upload")
|
|
- if link == nil {
|
|
+ if link != nil {
|
|
errbuf.WriteString(fmt.Sprintf("Upload link should not exist for %s, was %+v\n", o.Oid, link))
|
|
}
|
|
}
|
|
--
|
|
2.20.1
|
|
|