github.com/insionng/yougam@v0.0.0-20170714101924-2bc18d833463/libraries/pingcap/tidb/ddl/ddl_test.go (about) 1 // Copyright 2015 PingCAP, Inc. 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 // you may not use this file except in compliance with the License. 5 // You may obtain a copy of the License at 6 // 7 // http://www.apache.org/licenses/LICENSE-2.0 8 // 9 // Unless required by applicable law or agreed to in writing, software 10 // distributed under the License is distributed on an "AS IS" BASIS, 11 // See the License for the specific language governing permissions and 12 // limitations under the License. 13 14 package ddl_test 15 16 import ( 17 "testing" 18 19 "github.com/insionng/yougam/libraries/ngaut/log" 20 . "github.com/insionng/yougam/libraries/pingcap/check" 21 "github.com/insionng/yougam/libraries/pingcap/tidb" 22 "github.com/insionng/yougam/libraries/pingcap/tidb/ast" 23 "github.com/insionng/yougam/libraries/pingcap/tidb/kv" 24 ) 25 26 func TestT(t *testing.T) { 27 TestingT(t) 28 } 29 30 var _ = Suite(&testSuite{}) 31 32 type testSuite struct { 33 store kv.Storage 34 charsetInfo *ast.CharsetOpt 35 } 36 37 func (ts *testSuite) SetUpSuite(c *C) { 38 store, err := tidb.NewStore(tidb.EngineGoLevelDBMemory) 39 c.Assert(err, IsNil) 40 ts.store = store 41 ts.charsetInfo = &ast.CharsetOpt{ 42 Chs: "utf8", 43 Col: "utf8_bin", 44 } 45 46 } 47 48 func init() { 49 log.SetLevelByString("error") 50 }