Commit Graph

587 Commits

Author SHA1 Message Date
Kubernetes Prow Robot
235db13811 Merge pull request #84621 from seans3/print-flags-test
Moves test to new print_flags_test.go
2019-11-01 18:08:36 -07:00
Sean Sullivan
7d28c0b175 Move json/yaml printer tests to correct location 2019-11-01 09:28:41 -07:00
Sean Sullivan
290407c7eb Moves test to new print_flags_test.go 2019-10-31 16:04:01 -07:00
Sean Sullivan
ce85e863f5 Move small test back to printers_test.go 2019-10-31 15:42:50 -07:00
Kubernetes Prow Robot
c2513c8ae3 Merge pull request #82603 from robscott/endpointslice-kubectl-fix
Fixing EndpointSlice kubectl output
2019-10-25 13:03:39 -07:00
Sean Sullivan
8b2130343e Moves tableprinter.go and tabwriter.go to cli-runtime/pkg/printers. Copies PrintOptions to cli-runtime/pkg/printers. 2019-10-22 23:45:08 -07:00
Sean Sullivan
6660937139 Move template printer error test to correct location template_test.go 2019-10-22 13:07:07 -07:00
Sean Sullivan
57259fa419 Moves TestTemplatePanic to correct location of template_test.go 2019-10-22 13:07:07 -07:00
Sean Sullivan
d9ded62fb9 Moves TestTemplateStrings to correct location of template_test.go 2019-10-22 13:07:07 -07:00
Sean Sullivan
37fca51d74 Relocate tableprinter tests (#84027)
* Moves TestPrintUnstructuredObject to tableprinter_test.go

* Move TestUnknownTypePrinting to correct location of tableprinter_test.go

* Removes NewTablePrinter from TestCustomTypePrinting
2019-10-17 09:52:53 -07:00
Sean Sullivan
30d8a93768 Cleanup printer test package.
Updates internalversion BUILD file dependencies

Removes pkg/printers/internalversion from staticcheck failures
2019-10-15 18:13:00 -07:00
Sean Sullivan
cc56738a9e Removes unnecessary/irrelevant tests
Remove test TestPrintPodTable

Removes test TestPrintPodShowLabels
2019-10-15 17:54:36 -07:00
Sean Sullivan
6ced323a94 Adds missing tests.
Added test TestPrintEvent()

Added test TestPrintNamespace()

Added test TestPrintSecret()

Added test TestPrintServiceAccount()

Added test TestPrintPodCondition()

Added test TestPrintDaemonSetLists

Added test TestPrintJobList

Added test TestPrintPodDisruptionBudgetList

Adds test TestPrintConfigMap

Adds test TestPrintNetworkPolicy

Adds tests TestPrintRoleBinding and TestPrintClusterRoleBinding

Adds test TestPrintCertificateSigningRequest

Adds test TestPrintEndpoint

Adds test TestPrintReplicaSetList

Adds test TestPrintComponentStatus

Adds test TestPrintCronJobList

Adds test TestPrintPodTemplate

Adds test TestPrintPodTemplateList

Adds test TestPrintReplicationController

Adds test TestPrintServiceList

Adds test TestPrintStatefulSet
2019-10-15 17:52:06 -07:00
Sean Sullivan
cd4349ffbd Updates tests to expect metav1.TableRows instead of string, since this is what the "print" functions return.
Updated test TestPrintNodeStatus() to not use NewTableGenerator or NewTablePrinter

Updated test TestPrintNodeRode() to not use NewTableGenerator or NewTablePrinter

Updated test TestPrintNodeOSImage() to remove NewTableGenerator and NewTablePrinter

Updated test TestPrintNodeKernelVersion() to remove NewTableGenerator and NewTablePrinter

Updated test TestPrintNodeContainerRuntimeVersion() to remove NewTableGenerator and NewTablePrinter

Updated test TestPrintNodeName() to remove NewTableGenerator and NewTablePrinter

Updated test TestPrintNodeExternalIP() to remove NewTableGenerator and NewTablePrinter

Updated test TestPrintNodeInternalIP() to remove NewTableGenerator and NewTablePrinter

Updated ingress printing test to TestPrintIngress()

Updated test TestPrintService() to remove NewTableGenerator and NewTablePrinter

Updated test to TestPrintServiceLoadBalancer, removing NewTableGenerator and NewTablePrinter

Updated test TestPrintNonTerminatedPod() to remove NewTableGenerator

Updates test TestPrintDeployment() removing NewTableGenerator and NewTablePrinter

Updated test TestPrintDaemonSet(), removing NewTableGenerator and NewTablePrinter

Updated test TestPrintJob, removing NewTableGenerator and NewTablePrinter

Updates test TestPrintHPA(), removing NewTableGenerator and NewTablePrinter

Updated test TestPrintPodDisruptionBudget(), removing NewTableGenerator and NewTablePrinter

Updated test TestPrintControllerRevision(), removing NewTableGenerator and NewTablePrinter

Updates test TestPrintLease, removing NewTableGenerator and NewTablePrinter

Updates test TestPrintPriorityClass(), removing NewTableGenerator and NewTablePrinter

Updates test TestPrintRuntimeClass(), removing NewTableGenerator and NewTablePrinter

Updates test TestPrintEndpointSlice(), removing NewTableGenerator and NewTablePrinter

Updates test TestPrintReplicaSet(), removing NewTableGenerator and NewTablePrinter

Updates test TestPrintPersistentVolume(), removing NewTableGenerator and NewTablePrinter

Updates test TestPrintPersistentVolumneClaim(), removing NewTableGenerator and NewTablePrinter

Updates test TestPrintCronJob(), removing NewTableGenerator and NewTablePrinter

Updates test TestPrintStorageClass(), removing NewTableGenerator and NewTablePrinter
2019-10-15 17:44:28 -07:00
Sean Sullivan
3e7d8bc64e Moves tangential tests into another file. 2019-10-15 17:43:41 -07:00
Rob Scott
57757b65c7 Fixing EndpointSlice kubectl output 2019-09-24 13:12:23 -07:00
Kubernetes Prow Robot
2b7ceb215a Merge pull request #82054 from seans3/table-printer-tests
Rewrite tests for tableprinter.go
2019-09-11 08:43:24 -07:00
Rob Scott
ab1943e00b Adding kubectl support for EndpointSlice 2019-08-30 11:42:57 -07:00
Sean Sullivan
1b65c7acbe Rewrite tests for tableprinter.go 2019-08-28 21:40:55 -07:00
Kubernetes Prow Robot
6c9f26ca3a Merge pull request #80766 from robscott/discovery-api
Adding Discovery API for EndpointSlice
2019-08-28 14:44:09 -07:00
Rob Scott
f80cee9280 Adding discovery/v1alpha1 API for EndpointSlices 2019-08-26 14:50:00 -07:00
Sean Sullivan
1bc6fadded Split defaultPrintHandler from handlerEntry in table printing 2019-08-26 11:40:00 -07:00
Sean Sullivan
33bf8a8ebd Update PrintOptions to more appropriate GenerateOptions in some cases 2019-08-23 09:25:22 -07:00
Sean Sullivan
6108dac670 Change GenerateTable parameter PrintOptions to GenerateOptions 2019-08-22 10:17:42 -07:00
Sean Sullivan
6c0bf629e6 Remove decorateTable() from TableGenerator 2019-08-22 10:17:42 -07:00
Sean Sullivan
374eff070c Split printer tests into table generation then table printing 2019-08-19 13:05:54 -07:00
Sean Sullivan
6d903c4787 Split HumanReadablePrinter struct into generator and printer structs 2019-08-19 12:19:32 -07:00
Clayton Coleman
bc6b735aa2 kubectl get does not count binaryData keys on ConfigMap
Running `kubectl get` against a configmap with only binary keys
returned a `0` for the number of keys which is incorrect.
2019-07-31 17:19:52 -04:00
Kubernetes Prow Robot
5625eadd2a Merge pull request #72416 from liggitt/watch-event-type
Include event type in `kubectl get -w` output
2019-07-09 13:46:24 -07:00
Khaled Henidak(Kal)
54d42e6a65 types modifications + conversion + conversion testing 2019-07-02 15:39:05 +00:00
Jordan Liggitt
13273468b4 Add ability to output watch events from kubectl get 2019-06-28 16:24:54 -07:00
Jordan Liggitt
3e7f6e508a Add client-side status object handling 2019-06-28 11:55:31 -07:00
Kubernetes Prow Robot
4745946525 Merge pull request #79345 from liggitt/kubectl-printing
Add meta Table tests, fix --watch-only with single item
2019-06-27 20:09:33 -07:00
Kubernetes Prow Robot
c1fc717ac6 Merge pull request #79349 from roycaihw/printer-nil-ptr-ref
Printer: fix a nil pointer dereference
2019-06-25 11:44:36 -07:00
Connor Hoehn
265fd048c0 Remove the OutputFormatType and OutputFormatArgument fields as they are no longer used. 2019-06-25 09:10:21 -04:00
Haowei Cai
095d9349a1 printer: fix a nil pointer dereference 2019-06-24 13:11:18 -07:00
Jordan Liggitt
5d508760e3 Fix --watch-only of a single item with table output 2019-06-24 09:34:15 -07:00
Jordan Liggitt
a3bb81ff32 Ensure defaulting applies to custom resource items in list response 2019-06-06 09:17:31 -04:00
Kubernetes Prow Robot
274876ef9a Merge pull request #77448 from smarterclayton/api_serve
Support meta.k8s.io/v1 Table and PartialObjectMetadata requests to the API
2019-05-10 21:30:37 -07:00
Clayton Coleman
33a3e325f7 API server should offer metav1 Table/Partial transforms
Now that internal types are equivalent, allow the apiserver to serve
metav1 and metav1beta1 depending on the client. Test that in the
apiserver integration test and ensure we get the appropriate responses.

Register the metav1 type in the appropriate external locations.
2019-05-10 15:29:07 -04:00
Kubernetes Prow Robot
548bf0afe5 Merge pull request #77580 from liggitt/fix-list-interface
Fix unstructured list interface compatibility, fix kubectl paging
2019-05-08 20:13:26 -07:00
Jordan Liggitt
e5778f05b9 Fix unstructured list interface compatibility, fix kubectl paging 2019-05-08 02:00:18 -04:00
Sean Sullivan
41b84b7f6e Unexport PrintTable function 2019-05-06 22:16:45 -07:00
Sean Sullivan
13f3f11f52 tableprinter: simplifies default printer handler 2019-05-03 11:46:10 -07:00
Kubernetes Prow Robot
f6ab463695 Merge pull request #76647 from cwdsuzhou/add_pv_test_in_printer
Add some tests for printing pv
2019-05-01 14:32:17 -07:00
Baasbank
d97b7f20f8 fixes golint errors in pkg/printers/storage
fixes golint errors in pkg/printers

fixes golint errors for pkg/printers/internalversion

implements recommended changes
2019-05-01 17:02:55 +01:00
Sean Sullivan
bbc2886a3b Rename NewHumanReadablePrinter to NewTablePrinter 2019-04-29 11:42:04 -07:00
Kubernetes Prow Robot
7790fbeed1 Merge pull request #76746 from seans3/table-printer-split
Split humanreadble.go into tablegenerator.go and tableprinter.go
2019-04-26 02:06:32 -07:00
caiweidong
6872cf2a55 Support print volumeMode using kubectl get pv/pvc -o wide 2019-04-24 23:30:57 +08:00
Davanum Srinivas
7b8c9acc09 remove unused code
Change-Id: If821920ec8872e326b7d85437ad8d2620807799d
2019-04-19 08:36:31 -04:00