diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index 368b149..f81fa63 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -36,23 +36,23 @@ }, { "ImportPath": "github.com/tsuru/tsuru/db/storage", - "Comment": "0.6.0-9-g5d32bbe", - "Rev": "5d32bbe10562ead99ba5b7d8a075654a66c783ea" + "Comment": "0.9.0-431-ga83fbc0", + "Rev": "a83fbc036f0a4e68e188486d70a13850bf91a2d0" }, { "ImportPath": "github.com/tsuru/tsuru/fs", - "Comment": "0.6.0-9-g5d32bbe", - "Rev": "5d32bbe10562ead99ba5b7d8a075654a66c783ea" + "Comment": "0.9.0-431-ga83fbc0", + "Rev": "a83fbc036f0a4e68e188486d70a13850bf91a2d0" }, { "ImportPath": "github.com/tsuru/tsuru/log", - "Comment": "0.6.0-9-g5d32bbe", - "Rev": "5d32bbe10562ead99ba5b7d8a075654a66c783ea" + "Comment": "0.9.0-431-ga83fbc0", + "Rev": "a83fbc036f0a4e68e188486d70a13850bf91a2d0" }, { "ImportPath": "github.com/tsuru/tsuru/safe", - "Comment": "0.6.0-9-g5d32bbe", - "Rev": "5d32bbe10562ead99ba5b7d8a075654a66c783ea" + "Comment": "0.9.0-431-ga83fbc0", + "Rev": "a83fbc036f0a4e68e188486d70a13850bf91a2d0" }, { "ImportPath": "gopkg.in/mgo.v2", diff --git a/api/utils_test.go b/api/utils_test.go index 8208527..df04e64 100644 --- a/api/utils_test.go +++ b/api/utils_test.go @@ -1,4 +1,4 @@ -// Copyright 2014 gandalf authors. All rights reserved. +// Copyright 2015 gandalf authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. @@ -13,7 +13,7 @@ import ( "github.com/tsuru/gandalf/db" "github.com/tsuru/gandalf/fs" "github.com/tsuru/gandalf/user" - testingfs "github.com/tsuru/tsuru/fs/testing" + "github.com/tsuru/tsuru/fs/fstest" "gopkg.in/mgo.v2/bson" "launchpad.net/gocheck" ) @@ -22,7 +22,7 @@ func Test(t *testing.T) { gocheck.TestingT(t) } type S struct { tmpdir string - rfs *testingfs.RecordingFs + rfs *fstest.RecordingFs router *pat.Router } @@ -39,7 +39,7 @@ func (s *S) SetUpSuite(c *gocheck.C) { } func (s *S) SetUpTest(c *gocheck.C) { - s.rfs = &testingfs.RecordingFs{} + s.rfs = &fstest.RecordingFs{} fs.Fsystem = s.rfs bareTemplate, _ := config.GetString("git:bare:template") fs.Fsystem.MkdirAll(bareTemplate+"/hooks", 0755) diff --git a/testing/server.go b/gandalftest/server.go similarity index 89% rename from testing/server.go rename to gandalftest/server.go index f9b655d..217fdd6 100644 --- a/testing/server.go +++ b/gandalftest/server.go @@ -1,8 +1,8 @@ -// Copyright 2013 gandalf authors. All rights reserved. +// Copyright 2015 gandalf authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -package testing +package gandalftest import ( "io/ioutil" diff --git a/testing/server_test.go b/gandalftest/server_test.go similarity index 87% rename from testing/server_test.go rename to gandalftest/server_test.go index 34cde9f..a1596e5 100644 --- a/testing/server_test.go +++ b/gandalftest/server_test.go @@ -1,8 +1,8 @@ -// Copyright 2014 gandalf authors. All rights reserved. +// Copyright 2015 gandalf authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -package testing +package gandalftest import ( "net/http" diff --git a/hook/hook_test.go b/hook/hook_test.go index ffbb7f3..852f2e9 100644 --- a/hook/hook_test.go +++ b/hook/hook_test.go @@ -1,4 +1,4 @@ -// Copyright 2014 gandalf authors. All rights reserved. +// Copyright 2015 gandalf authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. @@ -13,7 +13,7 @@ import ( "github.com/tsuru/config" "github.com/tsuru/gandalf/db" "github.com/tsuru/gandalf/fs" - testingfs "github.com/tsuru/tsuru/fs/testing" + "github.com/tsuru/tsuru/fs/fstest" "launchpad.net/gocheck" ) @@ -21,7 +21,7 @@ func Test(t *testing.T) { gocheck.TestingT(t) } type S struct { tmpdir string - rfs *testingfs.RecordingFs + rfs *fstest.RecordingFs } var _ = gocheck.Suite(&S{}) @@ -36,7 +36,7 @@ func (s *S) SetUpSuite(c *gocheck.C) { } func (s *S) SetUpTest(c *gocheck.C) { - s.rfs = &testingfs.RecordingFs{} + s.rfs = &fstest.RecordingFs{} fs.Fsystem = s.rfs bareTemplate, _ := config.GetString("git:bare:template") fs.Fsystem.MkdirAll(bareTemplate+"/hooks", 0755) @@ -77,7 +77,7 @@ func (s *S) TestCanAddNewHook(c *gocheck.C) { } func (s *S) TestCanAddNewHookInOldRepository(c *gocheck.C) { - s.rfs = &testingfs.RecordingFs{} + s.rfs = &fstest.RecordingFs{} fs.Fsystem = s.rfs bareTemplate, _ := config.GetString("git:bare:template") err := fs.Fsystem.RemoveAll(bareTemplate + "/hooks") diff --git a/repository/git_test.go b/repository/git_test.go index 0246a09..56e380c 100644 --- a/repository/git_test.go +++ b/repository/git_test.go @@ -1,4 +1,4 @@ -// Copyright 2014 gandalf authors. All rights reserved. +// Copyright 2015 gandalf authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. @@ -11,7 +11,7 @@ import ( "github.com/tsuru/commandmocker" "github.com/tsuru/config" "github.com/tsuru/gandalf/fs" - "github.com/tsuru/tsuru/fs/testing" + "github.com/tsuru/tsuru/fs/fstest" "launchpad.net/gocheck" ) @@ -80,7 +80,7 @@ func (s *S) TestNewBareShouldNotPassTemplateOptionWhenItsNotSetInConfig(c *goche } func (s *S) TestRemoveBareShouldRemoveBareDirFromFileSystem(c *gocheck.C) { - rfs := &testing.RecordingFs{FileContent: "foo"} + rfs := &fstest.RecordingFs{FileContent: "foo"} fs.Fsystem = rfs defer func() { fs.Fsystem = nil }() err := removeBare("myBare") @@ -90,8 +90,8 @@ func (s *S) TestRemoveBareShouldRemoveBareDirFromFileSystem(c *gocheck.C) { } func (s *S) TestRemoveBareShouldReturnDescriptiveErrorWhenRemovalFails(c *gocheck.C) { - rfs := &testing.RecordingFs{FileContent: "foo"} - fs.Fsystem = &testing.FileNotFoundFs{RecordingFs: *rfs} + rfs := &fstest.RecordingFs{FileContent: "foo"} + fs.Fsystem = &fstest.FileNotFoundFs{RecordingFs: *rfs} defer func() { fs.Fsystem = nil }() err := removeBare("fooo") c.Assert(err, gocheck.ErrorMatches, "^Could not remove git bare repository: .*") diff --git a/repository/repository_test.go b/repository/repository_test.go index df86fd8..d2521a0 100644 --- a/repository/repository_test.go +++ b/repository/repository_test.go @@ -24,7 +24,7 @@ import ( "github.com/tsuru/gandalf/db" "github.com/tsuru/gandalf/fs" "github.com/tsuru/gandalf/multipartzip" - fstesting "github.com/tsuru/tsuru/fs/testing" + "github.com/tsuru/tsuru/fs/fstest" "gopkg.in/mgo.v2" "gopkg.in/mgo.v2/bson" "launchpad.net/gocheck" @@ -226,7 +226,7 @@ func (s *S) TestNewShouldCreateNamesakeRepositories(c *gocheck.C) { } func (s *S) TestNewPublicRepository(c *gocheck.C) { - rfs := &fstesting.RecordingFs{FileContent: "foo"} + rfs := &fstest.RecordingFs{FileContent: "foo"} fs.Fsystem = rfs defer func() { fs.Fsystem = nil }() tmpdir, err := commandmocker.Add("git", "$*") @@ -352,7 +352,7 @@ func (s *S) TestRemoveShouldRemoveBareRepositoryFromFileSystem(c *gocheck.C) { tmpdir, err := commandmocker.Add("git", "$*") c.Assert(err, gocheck.IsNil) defer commandmocker.Remove(tmpdir) - rfs := &fstesting.RecordingFs{FileContent: "foo"} + rfs := &fstest.RecordingFs{FileContent: "foo"} fs.Fsystem = rfs defer func() { fs.Fsystem = nil }() r, err := New("myRepo", []string{"pumpkin"}, []string{""}, false) @@ -367,7 +367,7 @@ func (s *S) TestRemoveShouldRemoveRepositoryFromDatabase(c *gocheck.C) { tmpdir, err := commandmocker.Add("git", "$*") c.Assert(err, gocheck.IsNil) defer commandmocker.Remove(tmpdir) - rfs := &fstesting.RecordingFs{FileContent: "foo"} + rfs := &fstest.RecordingFs{FileContent: "foo"} fs.Fsystem = rfs defer func() { fs.Fsystem = nil }() r, err := New("myRepo", []string{"pumpkin"}, []string{""}, false) @@ -382,7 +382,7 @@ func (s *S) TestRemoveShouldRemoveRepositoryFromDatabase(c *gocheck.C) { } func (s *S) TestRemoveShouldReturnMeaningfulErrorWhenRepositoryDoesNotExistInDatabase(c *gocheck.C) { - rfs := &fstesting.RecordingFs{FileContent: "foo"} + rfs := &fstest.RecordingFs{FileContent: "foo"} fs.Fsystem = rfs defer func() { fs.Fsystem = nil }() r := &Repository{Name: "fooBar"} @@ -421,7 +421,7 @@ func (s *S) TestUpdateWithRenaming(c *gocheck.C) { c.Assert(err, gocheck.IsNil) defer conn.Close() defer conn.Repository().RemoveId(r.Name) - rfs := &fstesting.RecordingFs{} + rfs := &fstest.RecordingFs{} fs.Fsystem = rfs defer func() { fs.Fsystem = nil }() expected := Repository{ diff --git a/user/user_test.go b/user/user_test.go index 7c472a8..3d41d6d 100644 --- a/user/user_test.go +++ b/user/user_test.go @@ -1,4 +1,4 @@ -// Copyright 2014 gandalf authors. All rights reserved. +// Copyright 2015 gandalf authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. @@ -14,7 +14,7 @@ import ( "github.com/tsuru/gandalf/db" "github.com/tsuru/gandalf/fs" "github.com/tsuru/gandalf/repository" - fstesting "github.com/tsuru/tsuru/fs/testing" + "github.com/tsuru/tsuru/fs/fstest" "gopkg.in/mgo.v2/bson" "launchpad.net/gocheck" ) @@ -22,7 +22,7 @@ import ( func Test(t *testing.T) { gocheck.TestingT(t) } type S struct { - rfs *fstesting.RecordingFs + rfs *fstest.RecordingFs } var _ = gocheck.Suite(&S{}) @@ -44,7 +44,7 @@ func (s *S) SetUpSuite(c *gocheck.C) { } func (s *S) SetUpTest(c *gocheck.C) { - s.rfs = &fstesting.RecordingFs{} + s.rfs = &fstest.RecordingFs{} fs.Fsystem = s.rfs }