Introduce kubectl describe --show-events

Introduce DescriberSettings for Describer display options
Introduce --show-events flag and DescriberSettings in Describer methods
Introduce unit-tests
Regenerated kubectl describe docs
Add events flag tests to test-cmd.sh

Signed-off-by: dhodovsk@redhat.com
Signed-off-by: jchaloup@redhat.com
This commit is contained in:
Jan Chaloupka
2016-04-20 19:27:32 +02:00
parent 60324ff884
commit dd2c9c578d
12 changed files with 410 additions and 76 deletions

View File

@@ -151,12 +151,14 @@ func (t *testPrinter) HandledResources() []string {
type testDescriber struct {
Name, Namespace string
Settings kubectl.DescriberSettings
Output string
Err error
}
func (t *testDescriber) Describe(namespace, name string) (output string, err error) {
func (t *testDescriber) Describe(namespace, name string, describerSettings kubectl.DescriberSettings) (output string, err error) {
t.Namespace, t.Name = namespace, name
t.Settings = describerSettings
return t.Output, t.Err
}