go fmt
This commit is contained in:
@@ -6,9 +6,9 @@ import (
|
|||||||
"github.com/deluan/gosonic/api/responses"
|
"github.com/deluan/gosonic/api/responses"
|
||||||
"github.com/deluan/gosonic/consts"
|
"github.com/deluan/gosonic/consts"
|
||||||
"github.com/deluan/gosonic/domain"
|
"github.com/deluan/gosonic/domain"
|
||||||
|
. "github.com/deluan/gosonic/tests"
|
||||||
"github.com/deluan/gosonic/tests/mocks"
|
"github.com/deluan/gosonic/tests/mocks"
|
||||||
"github.com/deluan/gosonic/utils"
|
"github.com/deluan/gosonic/utils"
|
||||||
. "github.com/deluan/gosonic/tests"
|
|
||||||
. "github.com/smartystreets/goconvey/convey"
|
. "github.com/smartystreets/goconvey/convey"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
package api
|
package api
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"github.com/astaxie/beego"
|
||||||
"github.com/deluan/gosonic/api/responses"
|
"github.com/deluan/gosonic/api/responses"
|
||||||
"github.com/deluan/gosonic/domain"
|
"github.com/deluan/gosonic/domain"
|
||||||
"github.com/deluan/gosonic/utils"
|
"github.com/deluan/gosonic/utils"
|
||||||
"github.com/karlkfi/inject"
|
"github.com/karlkfi/inject"
|
||||||
"github.com/astaxie/beego"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type GetMusicDirectoryController struct {
|
type GetMusicDirectoryController struct {
|
||||||
|
|||||||
@@ -3,12 +3,12 @@ package api_test
|
|||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
|
"github.com/deluan/gosonic/api/responses"
|
||||||
"github.com/deluan/gosonic/domain"
|
"github.com/deluan/gosonic/domain"
|
||||||
|
. "github.com/deluan/gosonic/tests"
|
||||||
"github.com/deluan/gosonic/tests/mocks"
|
"github.com/deluan/gosonic/tests/mocks"
|
||||||
"github.com/deluan/gosonic/utils"
|
"github.com/deluan/gosonic/utils"
|
||||||
. "github.com/deluan/gosonic/tests"
|
|
||||||
. "github.com/smartystreets/goconvey/convey"
|
. "github.com/smartystreets/goconvey/convey"
|
||||||
"github.com/deluan/gosonic/api/responses"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestGetMusicDirectory(t *testing.T) {
|
func TestGetMusicDirectory(t *testing.T) {
|
||||||
|
|||||||
+1
-1
@@ -1,11 +1,11 @@
|
|||||||
package api_test
|
package api_test
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"encoding/json"
|
||||||
"github.com/deluan/gosonic/api/responses"
|
"github.com/deluan/gosonic/api/responses"
|
||||||
. "github.com/deluan/gosonic/tests"
|
. "github.com/deluan/gosonic/tests"
|
||||||
. "github.com/smartystreets/goconvey/convey"
|
. "github.com/smartystreets/goconvey/convey"
|
||||||
"testing"
|
"testing"
|
||||||
"encoding/json"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestPing(t *testing.T) {
|
func TestPing(t *testing.T) {
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
package responses_test
|
package responses_test
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"testing"
|
|
||||||
. "github.com/smartystreets/goconvey/convey"
|
|
||||||
. "github.com/deluan/gosonic/tests"
|
|
||||||
. "github.com/deluan/gosonic/api/responses"
|
. "github.com/deluan/gosonic/api/responses"
|
||||||
|
. "github.com/deluan/gosonic/tests"
|
||||||
|
. "github.com/smartystreets/goconvey/convey"
|
||||||
|
"testing"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestSubsonicResponses(t *testing.T) {
|
func TestSubsonicResponses(t *testing.T) {
|
||||||
|
|||||||
@@ -4,9 +4,9 @@ import (
|
|||||||
"github.com/dhowden/itl"
|
"github.com/dhowden/itl"
|
||||||
"net/url"
|
"net/url"
|
||||||
"os"
|
"os"
|
||||||
"strings"
|
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
type ItunesScanner struct{}
|
type ItunesScanner struct{}
|
||||||
|
|||||||
+2
-2
@@ -1,12 +1,12 @@
|
|||||||
package tests
|
package tests
|
||||||
|
|
||||||
import (
|
import (
|
||||||
. "github.com/smartystreets/goconvey/convey"
|
"bytes"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"encoding/xml"
|
"encoding/xml"
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/deluan/gosonic/api/responses"
|
"github.com/deluan/gosonic/api/responses"
|
||||||
"bytes"
|
. "github.com/smartystreets/goconvey/convey"
|
||||||
)
|
)
|
||||||
|
|
||||||
func ShouldMatchXML(actual interface{}, expected ...interface{}) string {
|
func ShouldMatchXML(actual interface{}, expected ...interface{}) string {
|
||||||
|
|||||||
@@ -2,9 +2,9 @@ package mocks
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/deluan/gosonic/domain"
|
"github.com/deluan/gosonic/domain"
|
||||||
"errors"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func CreateMockAlbumRepo() *MockAlbum {
|
func CreateMockAlbumRepo() *MockAlbum {
|
||||||
@@ -37,7 +37,7 @@ func (m *MockAlbum) Exists(id string) (bool, error) {
|
|||||||
if m.err {
|
if m.err {
|
||||||
return false, errors.New("Error!")
|
return false, errors.New("Error!")
|
||||||
}
|
}
|
||||||
_, found := m.data[id];
|
_, found := m.data[id]
|
||||||
return found, nil
|
return found, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,9 +2,9 @@ package mocks
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/deluan/gosonic/domain"
|
"github.com/deluan/gosonic/domain"
|
||||||
"errors"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func CreateMockArtistRepo() *MockArtist {
|
func CreateMockArtistRepo() *MockArtist {
|
||||||
@@ -37,7 +37,7 @@ func (m *MockArtist) Exists(id string) (bool, error) {
|
|||||||
if m.err {
|
if m.err {
|
||||||
return false, errors.New("Error!")
|
return false, errors.New("Error!")
|
||||||
}
|
}
|
||||||
_, found := m.data[id];
|
_, found := m.data[id]
|
||||||
return found, nil
|
return found, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,9 +2,9 @@ package mocks
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/deluan/gosonic/domain"
|
"github.com/deluan/gosonic/domain"
|
||||||
"errors"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func CreateMockMediaFileRepo() *MockMediaFile {
|
func CreateMockMediaFileRepo() *MockMediaFile {
|
||||||
@@ -37,7 +37,7 @@ func (m *MockMediaFile) Exists(id string) (bool, error) {
|
|||||||
if m.err {
|
if m.err {
|
||||||
return false, errors.New("Error!")
|
return false, errors.New("Error!")
|
||||||
}
|
}
|
||||||
_, found := m.data[id];
|
_, found := m.data[id]
|
||||||
return found, nil
|
return found, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user