Skip to content

🎧 Your Personal Streaming Service

Upgrades to Beego v1.8.0

Deluan7202f618fe52
diff --git a/api/browsing_test.go b/api/browsing_test.go
index ef7f731e5..2f3262d49 100644
--- a/api/browsing_test.go
+++ b/api/browsing_test.go
@@ -93,7 +93,7 @@ func TestGetIndexes(t *testing.T) {
So(UnindentJSON(w.Body.Bytes()), ShouldContainSubstring, emptyResponse)
})
- Convey("And it should return empty if 'ifModifiedSince' is the asme as tie index last update", func() {
+ Convey("And it should return empty if 'ifModifiedSince' is the same as the index last update", func() {
mockRepo.SetData(`[{"Id": "A","Artists": [
{"ArtistId": "21", "Artist": "Afrolicious"}
]}]`, 2)
diff --git a/tests/init_tests.go b/tests/init_tests.go
index a08b80c42..ad7658e1a 100644
--- a/tests/init_tests.go
+++ b/tests/init_tests.go
@@ -4,6 +4,7 @@ import (
"os"
"path/filepath"
"runtime"
+ "sync"
"testing"
"github.com/astaxie/beego"
@@ -11,15 +12,21 @@ import (
"github.com/cloudsonic/sonic-server/utils"
)
+var initSync sync.Once
+
func Init(t *testing.T, skipOnShort bool) {
- conf.LoadFromFile("../tests/sonic-test.toml")
if skipOnShort && testing.Short() {
t.Skip("skipping test in short mode.")
}
-
_, file, _, _ := runtime.Caller(0)
appPath, _ := filepath.Abs(filepath.Join(filepath.Dir(file), ".."))
- beego.TestBeegoInit(appPath)
+ confPath, _ := filepath.Abs(filepath.Join(appPath, "tests", "sonic-test.toml"))
+
+ conf.LoadFromFile(confPath)
+
+ initSync.Do(func() {
+ beego.TestBeegoInit(appPath)
+ })
noLog := os.Getenv("NOLOG")
if noLog != "" {
diff --git a/vendor/vendor.json b/vendor/vendor.json
index 4a576f139..9df42e454 100644
--- a/vendor/vendor.json
+++ b/vendor/vendor.json
@@ -9,76 +9,76 @@
"revisionTime": "2016-03-09T02:19:12Z"
},
{
- "checksumSHA1": "g88lXw8/tNLPuUbIkPfLy14cvro=",
+ "checksumSHA1": "2otmKRoQSKacroMbiWkrnUCr0JI=",
"path": "github.com/astaxie/beego",
- "revision": "92d0b9ae95662d04e1d32eeffa52b4697b01ae37",
- "revisionTime": "2016-01-17T16:22:31Z",
- "version": "v1.6.0",
- "versionExact": "v1.6.0"
+ "revision": "323a1c4214101331a4b71922c23d19b7409ac71f",
+ "revisionTime": "2017-03-06T13:59:04Z",
+ "version": "=v1.8.0",
+ "versionExact": "v1.8.0"
},
{
- "checksumSHA1": "rQn8zl27p0XLUUI0UCWdQs7WmYY=",
+ "checksumSHA1": "YNG2jEVIFD/0lKglDH3HkXBA1oo=",
"path": "github.com/astaxie/beego/config",
- "revision": "92d0b9ae95662d04e1d32eeffa52b4697b01ae37",
- "revisionTime": "2016-01-17T16:22:31Z",
- "version": "v1.6.0",
- "versionExact": "v1.6.0"
+ "revision": "323a1c4214101331a4b71922c23d19b7409ac71f",
+ "revisionTime": "2017-03-06T13:59:04Z",
+ "version": "=v1.8.0",
+ "versionExact": "v1.8.0"
},
{
- "checksumSHA1": "CqTJyI2ZtKkC6KnYY5QsDkk47T8=",
+ "checksumSHA1": "wd4Mf8As2xBLT+/Q41fcqnN9kLs=",
"path": "github.com/astaxie/beego/context",
- "revision": "92d0b9ae95662d04e1d32eeffa52b4697b01ae37",
- "revisionTime": "2016-01-17T16:22:31Z",
- "version": "v1.6.0",
- "versionExact": "v1.6.0"
+ "revision": "323a1c4214101331a4b71922c23d19b7409ac71f",
+ "revisionTime": "2017-03-06T13:59:04Z",
+ "version": "=v1.8.0",
+ "versionExact": "v1.8.0"
},
{
- "checksumSHA1": "7hA38bO7ntELUuMQ7svkw77H6wo=",
+ "checksumSHA1": "O2+lFXZZioy6VFEAmId67eyVKWo=",
"path": "github.com/astaxie/beego/grace",
- "revision": "92d0b9ae95662d04e1d32eeffa52b4697b01ae37",
- "revisionTime": "2016-01-17T16:22:31Z",
- "version": "v1.6.0",
- "versionExact": "v1.6.0"
+ "revision": "323a1c4214101331a4b71922c23d19b7409ac71f",
+ "revisionTime": "2017-03-06T13:59:04Z",
+ "version": "=v1.8.0",
+ "versionExact": "v1.8.0"
},
{
- "checksumSHA1": "e/ixIxO/URZioWyukzSWRWRV1xs=",
+ "checksumSHA1": "cNkTEA618ZjfoGplBhuLzXrNIWg=",
"path": "github.com/astaxie/beego/logs",
- "revision": "92d0b9ae95662d04e1d32eeffa52b4697b01ae37",
- "revisionTime": "2016-01-17T16:22:31Z",
- "version": "v1.6.0",
- "versionExact": "v1.6.0"
+ "revision": "323a1c4214101331a4b71922c23d19b7409ac71f",
+ "revisionTime": "2017-03-06T13:59:04Z",
+ "version": "=v1.8.0",
+ "versionExact": "v1.8.0"
},
{
- "checksumSHA1": "AYMeViKKF6IVaSnPD0b5bMVhrFY=",
+ "checksumSHA1": "dXvvTC4ePe3mebX2nOoJcLKJwnc=",
"path": "github.com/astaxie/beego/plugins/cors",
- "revision": "92d0b9ae95662d04e1d32eeffa52b4697b01ae37",
- "revisionTime": "2016-01-17T16:22:31Z",
- "version": "v1.6.0",
- "versionExact": "v1.6.0"
+ "revision": "323a1c4214101331a4b71922c23d19b7409ac71f",
+ "revisionTime": "2017-03-06T13:59:04Z",
+ "version": "=v1.8.0",
+ "versionExact": "v1.8.0"
},
{
- "checksumSHA1": "m5xWZpWkkoYHZsLNukJYXI/xwQ8=",
+ "checksumSHA1": "K5wG01CX2TKm+a+qKYxdfotSTKM=",
"path": "github.com/astaxie/beego/session",
- "revision": "92d0b9ae95662d04e1d32eeffa52b4697b01ae37",
- "revisionTime": "2016-01-17T16:22:31Z",
- "version": "v1.6.0",
- "versionExact": "v1.6.0"
+ "revision": "323a1c4214101331a4b71922c23d19b7409ac71f",
+ "revisionTime": "2017-03-06T13:59:04Z",
+ "version": "=v1.8.0",
+ "versionExact": "v1.8.0"
},
{
- "checksumSHA1": "Mu2lA5Jq0tRk9MjhWllyzcJD6KU=",
+ "checksumSHA1": "pP5Hj63keKtOQWl/3fyoF0TxeDk=",
"path": "github.com/astaxie/beego/toolbox",
- "revision": "92d0b9ae95662d04e1d32eeffa52b4697b01ae37",
- "revisionTime": "2016-01-17T16:22:31Z",
- "version": "v1.6.0",
- "versionExact": "v1.6.0"
+ "revision": "323a1c4214101331a4b71922c23d19b7409ac71f",
+ "revisionTime": "2017-03-06T13:59:04Z",
+ "version": "=v1.8.0",
+ "versionExact": "v1.8.0"
},
{
- "checksumSHA1": "liO1EDN3Es5s8iswsyoYiG8YJ5s=",
+ "checksumSHA1": "epd3Y7nD7QVzTW0ppwK+q4pKo/4=",
"path": "github.com/astaxie/beego/utils",
- "revision": "92d0b9ae95662d04e1d32eeffa52b4697b01ae37",
- "revisionTime": "2016-01-17T16:22:31Z",
- "version": "v1.6.0",
- "versionExact": "v1.6.0"
+ "revision": "323a1c4214101331a4b71922c23d19b7409ac71f",
+ "revisionTime": "2017-03-06T13:59:04Z",
+ "version": "=v1.8.0",
+ "versionExact": "v1.8.0"
},
{
"checksumSHA1": "H57oqpzRpxtzb0xoPbhWYEy9KSA=",