From e170d40f909057070d6bc00da3dd419ae01f450b Mon Sep 17 00:00:00 2001 From: Gyuho Lee Date: Thu, 29 Mar 2018 17:35:34 -0700 Subject: [PATCH] functional-tester: move "etcd-runner" to "./cmd" Signed-off-by: Gyuho Lee --- .../{ => cmd}/etcd-runner/main.go | 6 +++--- tools/functional-tester/etcd-runner/doc.go | 16 ---------------- .../command => runner}/election_command.go | 2 +- .../{etcd-runner/command => runner}/error.go | 2 +- .../{etcd-runner/command => runner}/global.go | 2 +- .../{etcd-runner/command => runner}/help.go | 2 +- .../command => runner}/lease_renewer_command.go | 2 +- .../command => runner}/lock_racer_command.go | 2 +- .../{etcd-runner/command => runner}/root.go | 4 ++-- .../command => runner}/watch_command.go | 2 +- 10 files changed, 12 insertions(+), 28 deletions(-) rename tools/functional-tester/{ => cmd}/etcd-runner/main.go (78%) delete mode 100644 tools/functional-tester/etcd-runner/doc.go rename tools/functional-tester/{etcd-runner/command => runner}/election_command.go (99%) rename tools/functional-tester/{etcd-runner/command => runner}/error.go (98%) rename tools/functional-tester/{etcd-runner/command => runner}/global.go (99%) rename tools/functional-tester/{etcd-runner/command => runner}/help.go (99%) rename tools/functional-tester/{etcd-runner/command => runner}/lease_renewer_command.go (99%) rename tools/functional-tester/{etcd-runner/command => runner}/lock_racer_command.go (99%) rename tools/functional-tester/{etcd-runner/command => runner}/root.go (94%) rename tools/functional-tester/{etcd-runner/command => runner}/watch_command.go (99%) diff --git a/tools/functional-tester/etcd-runner/main.go b/tools/functional-tester/cmd/etcd-runner/main.go similarity index 78% rename from tools/functional-tester/etcd-runner/main.go rename to tools/functional-tester/cmd/etcd-runner/main.go index 04fede098..41fb0f446 100644 --- a/tools/functional-tester/etcd-runner/main.go +++ b/tools/functional-tester/cmd/etcd-runner/main.go @@ -12,11 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. -// etcd-runner is a command line application that performs tests on etcd. +// etcd-runner is a program for testing etcd clientv3 features against a fault injected cluster. package main -import "github.com/coreos/etcd/tools/functional-tester/etcd-runner/command" +import "github.com/coreos/etcd/tools/functional-tester/runner" func main() { - command.Start() + runner.Start() } diff --git a/tools/functional-tester/etcd-runner/doc.go b/tools/functional-tester/etcd-runner/doc.go deleted file mode 100644 index 9fb3ba2cb..000000000 --- a/tools/functional-tester/etcd-runner/doc.go +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright 2016 The etcd Authors -// -// 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. - -// etcd-runner is a program for testing etcd clientv3 features against a fault injected cluster. -package main diff --git a/tools/functional-tester/etcd-runner/command/election_command.go b/tools/functional-tester/runner/election_command.go similarity index 99% rename from tools/functional-tester/etcd-runner/command/election_command.go rename to tools/functional-tester/runner/election_command.go index 174670b80..b2bc99a16 100644 --- a/tools/functional-tester/etcd-runner/command/election_command.go +++ b/tools/functional-tester/runner/election_command.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package command +package runner import ( "context" diff --git a/tools/functional-tester/etcd-runner/command/error.go b/tools/functional-tester/runner/error.go similarity index 98% rename from tools/functional-tester/etcd-runner/command/error.go rename to tools/functional-tester/runner/error.go index 3188cd5e4..335e85cb7 100644 --- a/tools/functional-tester/etcd-runner/command/error.go +++ b/tools/functional-tester/runner/error.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package command +package runner import ( "fmt" diff --git a/tools/functional-tester/etcd-runner/command/global.go b/tools/functional-tester/runner/global.go similarity index 99% rename from tools/functional-tester/etcd-runner/command/global.go rename to tools/functional-tester/runner/global.go index 968dd567e..94a3a2aae 100644 --- a/tools/functional-tester/etcd-runner/command/global.go +++ b/tools/functional-tester/runner/global.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package command +package runner import ( "context" diff --git a/tools/functional-tester/etcd-runner/command/help.go b/tools/functional-tester/runner/help.go similarity index 99% rename from tools/functional-tester/etcd-runner/command/help.go rename to tools/functional-tester/runner/help.go index 3767b0e10..63e9815ab 100644 --- a/tools/functional-tester/etcd-runner/command/help.go +++ b/tools/functional-tester/runner/help.go @@ -14,7 +14,7 @@ // copied from https://github.com/rkt/rkt/blob/master/rkt/help.go -package command +package runner import ( "bytes" diff --git a/tools/functional-tester/etcd-runner/command/lease_renewer_command.go b/tools/functional-tester/runner/lease_renewer_command.go similarity index 99% rename from tools/functional-tester/etcd-runner/command/lease_renewer_command.go rename to tools/functional-tester/runner/lease_renewer_command.go index 85a022626..a57c53f27 100644 --- a/tools/functional-tester/etcd-runner/command/lease_renewer_command.go +++ b/tools/functional-tester/runner/lease_renewer_command.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package command +package runner import ( "context" diff --git a/tools/functional-tester/etcd-runner/command/lock_racer_command.go b/tools/functional-tester/runner/lock_racer_command.go similarity index 99% rename from tools/functional-tester/etcd-runner/command/lock_racer_command.go rename to tools/functional-tester/runner/lock_racer_command.go index 6cd36d50b..18b10e403 100644 --- a/tools/functional-tester/etcd-runner/command/lock_racer_command.go +++ b/tools/functional-tester/runner/lock_racer_command.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package command +package runner import ( "context" diff --git a/tools/functional-tester/etcd-runner/command/root.go b/tools/functional-tester/runner/root.go similarity index 94% rename from tools/functional-tester/etcd-runner/command/root.go rename to tools/functional-tester/runner/root.go index cc4347b88..abd74af1b 100644 --- a/tools/functional-tester/etcd-runner/command/root.go +++ b/tools/functional-tester/runner/root.go @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -// Package command implements individual etcd-runner commands for the etcd-runner utility. -package command +// Package runner implements individual etcd-runner commands for the etcd-runner utility. +package runner import ( "log" diff --git a/tools/functional-tester/etcd-runner/command/watch_command.go b/tools/functional-tester/runner/watch_command.go similarity index 99% rename from tools/functional-tester/etcd-runner/command/watch_command.go rename to tools/functional-tester/runner/watch_command.go index c74bef397..646092ad0 100644 --- a/tools/functional-tester/etcd-runner/command/watch_command.go +++ b/tools/functional-tester/runner/watch_command.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package command +package runner import ( "context"