mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
integration: add doc
This commit is contained in:
parent
80212aaf4d
commit
ef44ba10cf
@ -146,6 +146,8 @@ type member struct {
|
|||||||
hss []*httptest.Server
|
hss []*httptest.Server
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Launch starts a member based on ServerConfig, PeerListeners
|
||||||
|
// and ClientListeners.
|
||||||
func (m *member) Launch(t *testing.T) {
|
func (m *member) Launch(t *testing.T) {
|
||||||
m.s = etcdserver.NewServer(&m.ServerConfig)
|
m.s = etcdserver.NewServer(&m.ServerConfig)
|
||||||
m.s.Ticker = time.Tick(tickDuration)
|
m.s.Ticker = time.Tick(tickDuration)
|
||||||
@ -170,14 +172,17 @@ func (m *member) Launch(t *testing.T) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Stop stops the member, but the data dir of the member is preserved.
|
||||||
func (m *member) Stop(t *testing.T) {
|
func (m *member) Stop(t *testing.T) {
|
||||||
panic("unimplemented")
|
panic("unimplemented")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Start starts the member using preserved data dir.
|
||||||
func (m *member) Start(t *testing.T) {
|
func (m *member) Start(t *testing.T) {
|
||||||
panic("unimplemented")
|
panic("unimplemented")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Terminate stops the member and remove the data dir.
|
||||||
func (m *member) Terminate(t *testing.T) {
|
func (m *member) Terminate(t *testing.T) {
|
||||||
m.s.Stop()
|
m.s.Stop()
|
||||||
for _, hs := range m.hss {
|
for _, hs := range m.hss {
|
||||||
|
25
integration/doc.go
Normal file
25
integration/doc.go
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
// Copyright 2014 CoreOS Inc.
|
||||||
|
//
|
||||||
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
// you may not use this file except in compliance with the License.
|
||||||
|
// You may obtain a copy of the License at
|
||||||
|
//
|
||||||
|
// http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
//
|
||||||
|
// Unless required by applicable law or agreed to in writing, software
|
||||||
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
// See the License for the specific language governing permissions and
|
||||||
|
// limitations under the License.
|
||||||
|
|
||||||
|
/*
|
||||||
|
functional tests are built upon embeded etcd, and focus on etcd functional
|
||||||
|
correctness.
|
||||||
|
|
||||||
|
Its goal:
|
||||||
|
1. it tests the whole code base except the command line parse.
|
||||||
|
2. it is able to check internal data, including raft, store and etc.
|
||||||
|
3. it is based on goroutine, which is faster than process.
|
||||||
|
4. it mainly tests user behavior and user-facing API.
|
||||||
|
*/
|
||||||
|
package integration
|
Loading…
x
Reference in New Issue
Block a user