Commit Graph

21 Commits

Author SHA1 Message Date
Roland Huß a220a88534
chore(e2e): Refactor to better track errors (#667)
* chore(e2e): Refactor e2e to better track errors

* Collect results from various `kn` calls to
  provide the context
* Changed sub-Run() commands to t.Log() to reduce
  the log noise and get file + line information
  in the log output
* Removed any Fatal() calls to allows the test
  to properly finish
* Only output via t.Log() to get the output at the
  proper places and allow Prow to better pick
  up the test results.
* Most important: EMOJIS !! 🦆🦆🦆🦆🦆

* chore(e2e): Add more dumpers

* Moar debug
2020-02-16 23:52:10 -08:00
Murugappan Chetty de7e3880d4 Fix misleading error message when verb is bad (#589)
* validate sub command verb (#557)

* fix review comments for pr #555

* validate sub commands

* update error message

* use inner args returned by find func

* return appropriate error message for #557

* return appropriate error message for #557

* Revert "fix review comments for pr #555"

This reverts commit 14ea8d2dc6.

* review comments for pr 589

* misleading error message when verb is bad (#557)

* misleading error message when verb is bad (#557)

* misleading error message when verb is bad (#557)
2020-01-19 23:47:04 -08:00
Navid Shaikh 2c1e5dc88d Selectively run e2e tests for serving, eventing (#547)
- Run only serving specific e2e tests locally
  ```
  E2E_TAGS="serving" ./test/e2e-tests-local.sh
  ```

 - Run only eventing specific e2e tests locally
  ```
  E2E_TAGS="eventing" ./test/e2e-tests-local.sh
  ```

 - Run all e2e tests locally
  ```
  ./test/e2e-tests-local.sh
  ```
2019-12-11 03:58:48 -08:00
Murugappan Chetty 8e010d0cbd service describe command : Move Cluster URL to --verbose from default output (#543)
* move cluster url to verbose in svc desc

* move cluster url to verbose in svc desc
2019-12-09 23:55:46 -08:00
Roland Huß e6f15f9b58 fix(service describe): Clarify URL labels (#460)
* fix(service describe): Clarify URL labels

Fixes #459.

* fix: integration test
2019-11-05 21:11:02 -08:00
Naomi Seyfer 4874b9a384 Human-readable revision describe (#475)
* Revision describe rebaseable

* Fix up for rebase

* Some tests

* moretests

* Forgot part of the refactor!

* Fix unit tests

* Change e2e tests and respond to feedback
2019-11-05 17:43:02 -08:00
Roland Huß a2d1ef7d83 chore(service): Improvements for waiting on service readiness (#431)
* Increased default timeout to 600s. This timeout will be triggered
  only when the Ready condition stays in UNKNOWN for that long. If its
  True or False then the command will return anyway sooner.
  So it makes sense to go for a much longer timeout than 60s
* Enhanced output to indicate the progress

This change needs some updates to the API and introduces a 'MessageCallback'
type which is calle for each intermediate event with the "Ready" condition message.
2019-10-10 06:06:06 -07:00
Naomi Seyfer b27e366dcb Service describe: information about revision status, tags, latest [created, ready] revisions, and latest traffic (#379)
* Change symbols, add latest and latest ready

* More info on what is latest and tags. Filter annotations and labels.

* Make current tests pass

* More tests

* No longer require Annotations in test

* Add error

* Adjust tests to match adjusted output

* Respond to review comments

* one more

* Fix double printing of revisions + test for it

* Differentiate between latest traffic and latest ready w/o that being reason for traffic

* Re-build with go 1.12

* Rebased

* Limit non-verbose output to error and image

* Fix tests for new format
2019-10-03 11:33:08 -07:00
Roland Huß 9625b5f4c5 chore(plugins, services, routes): Aligned "Not found" messages (#359)
For the sake of consistency with out own service commands and for kubectl,

`kn plugin list` should print:

```
No plugins found.
```

`kn service list` should print:

```
No services found.
```

and not `No resources found.` like it does now.

Same for `kn routes list`.
2019-08-22 00:23:32 -07:00
Naomi Seyfer 25c726453e Update serving dependency to 0.8; change all import paths (#368)
* Update serving to 0.8. Try building.

* Find the right serving version

* Change our own import path to knative.dev to match

* Remove dependency on old version of client

* Update yaml template

* Add sleep to test to deal with race

* fix merge conflict

* Update vendor modules
2019-08-15 18:09:08 -07:00
Roland Huß b4b254f64c feature(service describe): Output of service details (#252)
* feature(service describe): Output of service details

`kn service show` mimics `kubectl describe <sth>` as that it output detail information in human readable output.

A future extension should add machine readable output with `-o` to export
a single object in json/yaml (that is missing from `kn service list`)

This command shows information about the service itself, but also a summary about the associated revisions.

It also knows about scaling and concurrency options.

Options:

`--details`    : Print more information. By default only are shorter summary is shown

* chore: Cleanup up and refreshed dependencies

* fix(service describe): Integration test fix (revert "show" to "describe")

* fix: go.sum

* fix go.sum

* feature(service describe): Add printing of resources (requests/limits) + machine readable output with -o

* chore(service describe): Simplified digest handling

* chore(service describe): Sort maps by key when printed

* chore: Adapt mock framework

* chore(service describe): Test fixes

* chore: Added some tests

* more tests

* test: Moar tests

* chore: Even moar tests

* more, more tests

* changelog update

* fix(service describe): golint fixes
2019-08-08 08:23:56 -07:00
Martin Gencur b98e45e721 Restructure E2E test suite (#307)
* Restructure E2E test suite

* move out more tests from the basic workflow and put them in separate
files, including tests for routes
* rename revision_workflow_test.go to revision_test.go

* Run all tests in parallel
2019-07-29 06:00:05 -07:00
Martin Gencur 03ecb36440 Add E2E tests for Service, Revision, Route (#291)
* Add E2E tests for Service, revision, route

* service, revision, route describe and describe with print flags
* route list with print flags
* service create for a duplicate service

* Test serviceDeleteNonexistent and fixes
2019-07-25 23:46:43 -07:00
dr.max 9513dedfba Improves(e2e): imrpoves integration tests and to better run locally (#274)
1. refactors basic workflow (move code to common)
2. use different namespace accross test runs to isolate
3. include wait logic in CreateNamespace to allow multiple runs
4. include wait logic in DeleteNamespace to allow multiple runs

This is important since we need more integration tests and some of
these changes should allow `./test/e2e-tests-local.sh` to run on
local clusters (minikube or something other than test-infra) and
correctly behave during mutiple runs.
2019-07-23 10:13:34 -07:00
Tsubasa Nagasawa fca0a09e86 Clean up e2e test assertion (#264)
* Clean up e2e test assertion

Heavily rely on assert package as well as unit tests

* Iterate over a line for ensuring valid output

* Use subtests for easily spotting the error location
2019-07-15 04:41:26 -07:00
Roland Huß 98184eafbc refactor(serving): KnClient interface for single point of cluster access (#134)
* fix(serving): Remove hardcoded GVK and look it up from schema

Fixes #133.

* chore(serving): Add test for "WaitForService()"

* refactor(service): Add listRoutes() to client + generic way for list options

* chore(serving): Fixing rebase conflicts
2019-07-08 10:08:34 -07:00
Navid Shaikh aac0ec265e Adds kn route list command (#202)
- Accepts an argument name for listing particular route
- Enables the machine readable output flags
- Updates docs for kn route command group
- Adds unit tests for route command group and route list
- Adds integration tests for route list in basic workflow test
- Updates tests and getting namespace
- Adds more unit tests for code in pkg/kn/commands/route/list_flags.go
- Adds route list command in smoke tests
- Updates vendor/modules.txt
- Clean up imports
- Addresses review comments
 - replaces knative to Knative
 - uses reflect.DeepEqual for slice comparison
 - removes few code comments
 - removes irrelevant tests modifications from the PR
2019-07-02 11:25:32 -07:00
savitaashture 4cc5c84264 Added changes to support container port information while creating/updating service (#191) 2019-06-28 10:48:08 -07:00
Navid Shaikh 9c865a6115 List revisions for a given service (#194)
* Lists revisions for a given service

 Fixes #127

* Adds unit tests for listing revisions of a service

* Adds integration tests for listing revisions of a service

* Updates docs for listing revisions of a service

* Updates vendor/modules.txt
2019-06-20 13:29:00 -07:00
Navid Shaikh d25ea5f1e7 Renames service 'get' to 'list' (#179)
* Renames service 'get' to 'list'

 As per title.

* Renames get references to list in e2e tests

* Replaces get to list in docs
2019-06-13 13:56:43 -07:00
dr.max 39d994794b Adds a Golang version of e2e Basic workflow that can execute locally (#121)
1. creates a namespace 'kne2etests' (default name, change with env KN_E2E_NAMESPACE)
2. executes kn commands as per Basic workflow doc in said namespace
3. verifies each command's output
4. deletes the 'kne2etests' namespace
2019-06-11 19:49:43 -07:00