projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
13647: Count "failed to start services" as failure, not success.
[arvados.git]
/
services
/
crunch-run
/
git_mount_test.go
diff --git
a/services/crunch-run/git_mount_test.go
b/services/crunch-run/git_mount_test.go
index 39254df300ee4180309272162ca0f11dae1a9efd..5796ad7a278cfbb79df34210d3c81880e979a67b 100644
(file)
--- a/
services/crunch-run/git_mount_test.go
+++ b/
services/crunch-run/git_mount_test.go
@@
-6,9
+6,11
@@
package main
import (
"io/ioutil"
import (
"io/ioutil"
+ "net/url"
"os"
"path/filepath"
"os"
"path/filepath"
+ "git.curoverse.com/arvados.git/lib/config"
"git.curoverse.com/arvados.git/sdk/go/arvados"
"git.curoverse.com/arvados.git/sdk/go/arvadostest"
check "gopkg.in/check.v1"
"git.curoverse.com/arvados.git/sdk/go/arvados"
"git.curoverse.com/arvados.git/sdk/go/arvadostest"
check "gopkg.in/check.v1"
@@
-173,6
+175,15
@@
func (s *GitMountSuite) TestInvalid(c *check.C) {
},
matcher: ".*UUID.*",
},
},
matcher: ".*UUID.*",
},
+ {
+ gm: gitMount{
+ Path: "/",
+ UUID: arvadostest.Repository2UUID,
+ Commit: "5ebfab0522851df01fec11ec55a6d0f4877b542e",
+ Writable: true,
+ },
+ matcher: ".*writable.*",
+ },
} {
err := trial.gm.extractTree(&ArvTestClient{}, s.tmpdir, arvadostest.ActiveToken)
c.Check(err, check.NotNil)
} {
err := trial.gm.extractTree(&ArvTestClient{}, s.tmpdir, arvadostest.ActiveToken)
c.Check(err, check.NotNil)
@@
-194,7
+205,11
@@
func (s *GitMountSuite) checkTmpdirContents(c *check.C, expect []string) {
func (*GitMountSuite) useTestGitServer(c *check.C) {
git_client.InstallProtocol("https", git_http.NewClient(arvados.InsecureHTTPClient))
func (*GitMountSuite) useTestGitServer(c *check.C) {
git_client.InstallProtocol("https", git_http.NewClient(arvados.InsecureHTTPClient))
- port, err := ioutil.ReadFile("../../tmp/arv-git-httpd-ssl.port")
+ loader := config.NewLoader(nil, nil)
+ cfg, err := loader.Load()
+ c.Assert(err, check.IsNil)
+ cluster, err := cfg.GetCluster("")
c.Assert(err, check.IsNil)
c.Assert(err, check.IsNil)
- discoveryMap["gitUrl"] = "https://localhost:" + string(port)
+
+ discoveryMap["gitUrl"] = (*url.URL)(&cluster.Services.GitHTTP.ExternalURL).String()
}
}