mirror of
https://github.com/minio/minio.git
synced 2025-11-21 02:09:08 -05:00
Authorization validation in accordance with S3 signer AWSv2
This commit is contained in:
36
pkg/utils/database/tiedot/database_test.go
Normal file
36
pkg/utils/database/tiedot/database_test.go
Normal file
@@ -0,0 +1,36 @@
|
||||
package database
|
||||
|
||||
import (
|
||||
"os"
|
||||
"testing"
|
||||
|
||||
. "gopkg.in/check.v1"
|
||||
)
|
||||
|
||||
func Test(t *testing.T) { TestingT(t) }
|
||||
|
||||
type MySuite struct{}
|
||||
|
||||
var _ = Suite(&MySuite{})
|
||||
|
||||
func (s *MySuite) Testing(c *C) {
|
||||
d := NewDatabase()
|
||||
d.GetDBHandle("/tmp/testdata")
|
||||
defer os.RemoveAll("/tmp/testdata")
|
||||
|
||||
d.InitCollection("Matrix")
|
||||
|
||||
data := map[string]interface{}{
|
||||
"version": "1.4",
|
||||
"url": "golang.org",
|
||||
"language": "Go",
|
||||
}
|
||||
|
||||
docId, err1 := d.InsertToCollection("Matrix", data)
|
||||
c.Assert(err1, IsNil)
|
||||
|
||||
retdata, err2 := d.GetCollectionData("Matrix", docId)
|
||||
|
||||
c.Assert(err2, IsNil)
|
||||
c.Assert(data, DeepEquals, retdata)
|
||||
}
|
||||
Reference in New Issue
Block a user