Commit Graph

5 Commits

Author SHA1 Message Date
David Simansky b3431e34c0
Fix unit tests clash with local kubeconfig (#1418)
* Fix unit tests clash with local kubeconfig

* Add unit tests

* Format source code

* Add more tests to cover types.go

* Add more tests to cover namespaced.go
2021-08-05 06:12:53 -07:00
Markus Thömmes d647e44938
Upgrade a few assorted dependencies (#1220)
* Update spf13 deps

* Upgrade gotest.tools and correctly use versioned module

* Regenerate docs
2021-02-12 05:55:50 -08:00
Himanshu Ranjan 980a6a9469
Fix exit code on service delete and revision delete (#971)
* Fix exit code 0 upon service delete

* Mentioned bug fix in CHANGELOG.adoc

* Add error check test for service not found

* Fix for kn revision delete failure exit code and add test cases

* Testing changes in test cases for failure in intergration tests

* Fix test case error causing integration test failure
2020-08-06 03:41:28 -07:00
Roland Huß 1b9a76bc31
feature(serving): Update API to serving.knative.dev/v1 (#640)
* feature(serving): Update API to serving.knative.dev/v1

Due to an issue with 0.12.0 (a missing constant) the update also includes an update
to the latest knative-serving  and knative-eventing dependencies from master
(as reflected in version.go)

Signed-off-by: Roland Huß <roland@ro14nd.de>

* fix(serving): Bogus import removed

* fix(serving): Add missing go.sum entry
2020-02-07 02:03:14 -08:00
Roland Huß f26fdb4297 refactor,fix(revision list): Refactoring and fixing issues (#605)
* refactor,fix(revision list): Refactoring and fixing issues

This PR fixes the following issues of `kn revision list`:

* `kn revision list -A` didn't work as the internal service-get requires a namespace (that from the revision)
* `kn revison list -s myservice myrevision` was not supported
* Service caching assumed that the revision list returned by the server is grouped by servicename. This is not guaranteed.
* `kn revision list -o yaml` returned yaml with the artificial and bogus annotations used for printing out in columns.

The following refactorings were added:

* The main run function was simplified and splitted up in multiple methods
* List-filter handling was made straight forward (and hopefully easier to understand)

I abandoned my initial intention to remove the bogus, temporary, in-memory set annotations for tags and traffic as it does not fit well with the resource printer framework which only works with original K8s resource runtime.Object (and e.g. use serialization directly). I still don't like the hackish approach to add to annotatin (please note, how I need to write a wrapped printed to get rid of the annotations for fixing the `-o yaml` use case, which otherwise prints out those annotations, which are not existant on the server side), but for the sake of simplicity let's keep this (not dogmatic here).

* chore: Simplified

* chore: Some docs update

* fix: wtf

* fix(revision list): Add Namespace column for -A and unified list handling

* fix(revision list): truncate long columns

* add(revision list): Unit test for extracting target and tags

* fix(revision list): Add missing license header

* fix(revision list): Formatting issue

* fix: formatting

* chore: Some cosmetics
2020-01-16 13:05:03 -08:00