Browse Source

integration: add doc

Yicheng Qin 11 years ago
parent
commit
ef44ba10cf
2 changed files with 30 additions and 0 deletions
  1. 5 0
      integration/cluster_test.go
  2. 25 0
      integration/doc.go

+ 5 - 0
integration/cluster_test.go

@@ -146,6 +146,8 @@ type member struct {
 	hss []*httptest.Server
 }
 
+// Launch starts a member based on ServerConfig, PeerListeners
+// and ClientListeners.
 func (m *member) Launch(t *testing.T) {
 	m.s = etcdserver.NewServer(&m.ServerConfig)
 	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) {
 	panic("unimplemented")
 }
 
+// Start starts the member using preserved data dir.
 func (m *member) Start(t *testing.T) {
 	panic("unimplemented")
 }
 
+// Terminate stops the member and remove the data dir.
 func (m *member) Terminate(t *testing.T) {
 	m.s.Stop()
 	for _, hs := range m.hss {

+ 25 - 0
integration/doc.go

@@ -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