Permalink
Browse files

go fmt

  • Loading branch information...
cbrand committed Jan 21, 2015
1 parent 33a90f4 commit 81cf8cde031c2259686e277c17f18619524c915b
@@ -4,7 +4,7 @@ import (
"encoding/hex"
"io"
"net/http"
. "github.com/hoffie/larasync/api/common"
)
@@ -19,7 +19,7 @@ type AuthorizationClientTest struct {
}
var _ = Suite(&AuthorizationClientTest{
BaseTest: newBaseTest(),
BaseTest: newBaseTest(),
})
func (t *AuthorizationClientTest) getAuthorizationURL(c *C) string {
View
@@ -1,22 +1,21 @@
package client
import (
"os"
"crypto/rand"
"os"
"path"
"path/filepath"
"github.com/hoffie/larasync/repository"
"github.com/hoffie/larasync/helpers/x509"
edhelpers "github.com/hoffie/larasync/helpers/ed25519"
. "github.com/hoffie/larasync/api/common"
edhelpers "github.com/hoffie/larasync/helpers/ed25519"
"github.com/hoffie/larasync/helpers/x509"
"github.com/hoffie/larasync/repository"
. "gopkg.in/check.v1"
)
func newBaseTest() BaseTest {
return BaseTest{
}
return BaseTest{}
}
type BaseTest struct {
@@ -27,10 +26,10 @@ type BaseTest struct {
keyFile string
pubKey [PublicKeySize]byte
privateKey [PrivateKeySize]byte
encryptionKey [repository.EncryptionKeySize]byte
hashingKey [repository.HashingKeySize]byte
client *Client
server *TestServer
encryptionKey [repository.EncryptionKeySize]byte
hashingKey [repository.HashingKeySize]byte
client *Client
server *TestServer
}
func (t *BaseTest) serverURL(c *C) string {
@@ -42,7 +41,7 @@ func (t *BaseTest) SetUpTest(c *C) {
t.repositoryName = "test"
c.Assert(t.rm.Exists(t.repositoryName), Equals, false)
var err error
t.server, err = NewTestServer(t.certFile, t.keyFile, t.rm)
c.Assert(err, IsNil)
View
@@ -4,7 +4,7 @@ import (
"net/http"
"github.com/hoffie/larasync/api/tls"
. "github.com/hoffie/larasync/api/common"
)
View
@@ -4,8 +4,8 @@ import (
"io"
"net/http"
"github.com/hoffie/larasync/helpers/bincontainer"
. "github.com/hoffie/larasync/api/common"
"github.com/hoffie/larasync/helpers/bincontainer"
)
// putNIBRequest builds a request for uploading NIB
View
@@ -14,7 +14,7 @@ type NIBClientTest struct {
}
var _ = Suite(&NIBClientTest{
BaseTest: newBaseTest(),
BaseTest: newBaseTest(),
})
func (t *NIBClientTest) SetUpTest(c *C) {
View
@@ -3,7 +3,7 @@ package client
import (
"io"
"net/http"
. "github.com/hoffie/larasync/api/common"
)
@@ -16,7 +16,7 @@ type ObjectsClientTest struct {
}
var _ = Suite(&ObjectsClientTest{
BaseTest: newBaseTest(),
BaseTest: newBaseTest(),
})
func (t *ObjectsClientTest) SetUpTest(c *C) {
@@ -4,7 +4,7 @@ import (
"bytes"
"encoding/json"
"net/http"
"github.com/hoffie/larasync/api"
. "github.com/hoffie/larasync/api/common"
)
@@ -4,10 +4,10 @@ import (
"net"
"time"
. "github.com/hoffie/larasync/api/common"
"github.com/hoffie/larasync/api/server"
"github.com/hoffie/larasync/helpers/x509"
"github.com/hoffie/larasync/repository"
"github.com/hoffie/larasync/api/server"
. "github.com/hoffie/larasync/api/common"
)
// TestServer is used for creating and managing
@@ -2,7 +2,7 @@ package common
import (
"testing"
. "gopkg.in/check.v1"
)
@@ -5,7 +5,7 @@ import (
"net/http"
"net/url"
"os"
. "github.com/hoffie/larasync/api/common"
. "gopkg.in/check.v1"
)
@@ -10,7 +10,7 @@ import (
edhelpers "github.com/hoffie/larasync/helpers/ed25519"
"github.com/hoffie/larasync/repository"
. "github.com/hoffie/larasync/api/common"
)
View
@@ -2,21 +2,21 @@ package server
import (
"bytes"
"crypto/rand"
"fmt"
"io"
"os"
"net/http"
"net/http/httptest"
"net/url"
"os"
"path/filepath"
"time"
"crypto/rand"
"github.com/hoffie/larasync/repository"
"github.com/hoffie/larasync/helpers/x509"
edhelpers "github.com/hoffie/larasync/helpers/ed25519"
. "github.com/hoffie/larasync/api/common"
edhelpers "github.com/hoffie/larasync/helpers/ed25519"
"github.com/hoffie/larasync/helpers/x509"
"github.com/hoffie/larasync/repository"
. "gopkg.in/check.v1"
)
@@ -32,11 +32,11 @@ type BaseTests struct {
keyFile string
pubKey [PublicKeySize]byte
privateKey [PrivateKeySize]byte
server *Server
req *http.Request
httpMethod string
getURL func() string
urlParams url.Values
server *Server
req *http.Request
httpMethod string
getURL func() string
urlParams url.Values
}
func (t *BaseTests) SetUpTest(c *C) {
@@ -4,7 +4,7 @@ import (
"testing"
. "github.com/hoffie/larasync/api/common"
. "gopkg.in/check.v1"
)
View
@@ -4,7 +4,7 @@ import (
"net/http"
"encoding/json"
"github.com/hoffie/larasync/api"
)
@@ -4,9 +4,9 @@ import (
"net/http"
"github.com/hoffie/larasync/repository/nib"
. "gopkg.in/check.v1"
. "github.com/hoffie/larasync/api/common"
. "gopkg.in/check.v1"
)
type NIBPutTest struct {
@@ -8,7 +8,7 @@ import (
"net/http"
"github.com/gorilla/mux"
"github.com/hoffie/larasync/api"
. "github.com/hoffie/larasync/api/common"
)
@@ -8,7 +8,7 @@ import (
"strings"
. "github.com/hoffie/larasync/api/common"
. "gopkg.in/check.v1"
)
@@ -18,7 +18,7 @@ type RepoListTests struct {
}
var _ = Suite(&RepoListTests{
BaseTests: newBaseTest(),
BaseTests: newBaseTest(),
})
func (t *RepoListTests) SetUpTest(c *C) {
@@ -11,9 +11,9 @@ import (
"strings"
"github.com/hoffie/larasync/api"
. "github.com/hoffie/larasync/api/common"
. "gopkg.in/check.v1"
)
@@ -24,7 +24,7 @@ type RepoListCreateTests struct {
}
var _ = Suite(&RepoListCreateTests{
BaseTests: newBaseTest(),
BaseTests: newBaseTest(),
})
func (t *RepoListCreateTests) requestWithBytes(c *C, body []byte) *http.Request {
View
@@ -14,7 +14,7 @@ import (
"github.com/hoffie/larasync/helpers/lock"
"github.com/hoffie/larasync/helpers/x509"
"github.com/hoffie/larasync/repository"
. "github.com/hoffie/larasync/api/common"
)
View
@@ -6,8 +6,8 @@ import (
"io/ioutil"
"time"
"github.com/hoffie/larasync/api/server"
apicommon "github.com/hoffie/larasync/api/common"
"github.com/hoffie/larasync/api/server"
)
// ServerConfig contains all settings for our server mode.

0 comments on commit 81cf8cd

Please sign in to comment.