Commit Graph

138 Commits

Author SHA1 Message Date
dr.max e1ad66a60d
* allow plugins to extends all comamnd groups, e.g., kn-service-blah is OK (#834)
* prevent plugins that shadow commands of exsiting groups, e.g., kn-service-create is NOT OK
* list plugins that extend existing groups
* warn plugins that shadow command of existing groups
* add UTs for above
2020-06-01 03:07:03 -07:00
Navid Shaikh cdf6f29880
Add --requests and --limits resource flags (#859)
* Add --requests and --limits resource flags

  Fixes #490

  - Add deprecation message for --requests-cpu, --requests-memory,
  --limits-cpu and --limits-memory flag usage.

  - Add error message if new and deprecated, requests and limits flags
    are used together.

* Add resources requests and limits example for service create

* Add mock style unit tests

* Update existing unit tests for deprecated flags

* Add integration tests

* Add CHANGELOG entry

* Fix lint warnings

* Add unit tests for resource flags

* Fix typo for service name in e2e tests

* Refactor resource validation utility into test lib

* Remove commented out code

* Add references about managing resources and GPU in example

* Update image references in examples
2020-05-28 01:45:59 -07:00
Martin Gencur c6537a8e84
Update Tekton resources to v1beta1 (#861)
* Update to Tekton v1beta1

* replace PipelineResource with Task

* Pull kn task from github
2020-05-27 06:31:59 -07:00
Daniel Helfand 4b3b971ae5
remove use of os.Exit (#851) 2020-05-25 22:12:48 -07:00
Markus Thömmes 739e63f835
Replace pkg/errors with stdlib errors. (#853)
* Replace pkg/errors with stdlib errors.

* Add changelog entry.

* Fix changelog.
2020-05-25 08:10:47 -07:00
coryrc 2df459577e
Use test-infra direct insertion method (#840)
Now available from knative/test-infra repo directly.
2020-05-25 06:57:47 -07:00
Daniel Helfand 0df54bc500
refactor kn service delete --all e2e test (#837) 2020-05-15 04:09:00 -07:00
Navid Shaikh 20e1a79b62
fix(e2e): Create next namespace for e2e if one exists (#835)
* fix(e2e): Create next namespace if one exists

 Do not error out if the namespace to run e2e into exists, try creating
 next one in row. Retry at 20 next namespaces, before erroring out.

* Tag plugin tests as !serving and !eventing

* Debug: Create a test namespace to see if its skipped

* Revert "Debug: Create a test namespace to see if its skipped"

This reverts commit 8b45fcef4d.

* Refactor file utils from e2e tests to test lib
2020-05-14 04:33:59 -07:00
Daniel Helfand 6f615c6595
add kn service delete --all (#836) 2020-05-14 03:51:59 -07:00
Navid Shaikh e05c33447e
fix(e2e): Refactor e2e utils and resource actions (#832)
* fix(e2e): Refactor e2e utils and resource actions

 brings commonly re-used utilities into lib/test so they can be resused
 and e2e can be run selectively for eventing/serving.

* Refactor service and revision e2e test utils into test lib

* Docstrings for exported e2e test utils
2020-05-11 06:09:46 -07:00
Murugappan Chetty 644ecb68e5
refactor kn service export to export revisions (#819)
* refactor kn service export to export revisions

* refactor kn service export to export revisions

* refactor kn service export to export revisions

* refactor kn service export to export revisions

* kn service export refactor

* kn service export refactor

* kn service export refactor

* kn service export refactor

* review changes for #819
2020-05-05 02:19:44 -07:00
Roland Huß df9278743b
chore: Update to Knative serving/eventing 0.14.0 (#810)
* chore: Update to Knative serving/eventing 0.14.0

and also move ApiServerSource to v1alpha2, adapting the option
(from "controller" to "labelSelector")

* fix go.sum

* chore: Update and fix tests

* chore: fix go.sum
2020-04-16 14:27:48 -07:00
Navid Shaikh ccf8b69fc3
chore(e2): Run tests against v0.14.0 release of serving, eventing (#807) 2020-04-15 08:05:48 -07:00
Navid Shaikh 98282307f6
e2e: Run tekton e2e against pipeline v0.11.1 (#803)
* Use buildah task from master branch and paramterize FORMAT

* Configure pipeline v0.11.1

* DNM: Run tekton e2e in this PR

* Revert "DNM: Run tekton e2e in this PR"

This reverts commit 903f5bec409c90174a37cc84acd561a405ef896e.
2020-04-14 23:40:47 -07:00
Navid Shaikh 48f4359b24
e2e: Foreground delete for revisions and services in e2e (#794)
* e2e: Foreground delete for revisions and services in e2e

 to avoid any race conditions and flakes

* Use --wait instead of --no-wait=false
2020-04-14 18:20:47 -07:00
Ying Chun Guo 2225b4c8dd
Fix resource listing with -oname flag (#799)
* Fix resource listing with -oname flag

* add e2e tests
2020-04-14 07:10:16 -07:00
Shashwathi 88109bd439
Add e2e test for different service and revision label (#766)
* Add e2e test for different service and revision label

- Store results from one call and validate both revision and service labels
- Update var name for more better readability

Signed-off-by: Andrew Su <asu@pivotal.io>

* Test verifies expected labels are exact match to received labels
2020-04-14 02:22:16 -07:00
Ying Chun Guo d725ef594a
Fix error when output is set to name (#775)
* fix error when output is set to name

* add e2e test

* change to flags/listprint.go
2020-04-13 21:58:15 -07:00
Doug Davis 030279be38
Add -a flag as alias for --annotations (#782)
I find that I'm using annotations more and more and since `-a`
wasn't being used I decided we should save people from typing too much

Signed-off-by: Doug Davis <dug@us.ibm.com>
2020-04-10 04:45:05 -07:00
Lv Jiawei deb96303dd
Add "--target-utilization" to manage "autoscaling.knative.dev/targetUtilizationPercentage" annotation (#788)
* Support setting "autoscaling.knative.dev/targetUtilizationPercentage" annotation.
2020-04-09 03:49:03 -07:00
dr.max 395fc6c3b2
fix(#772) refactored / simplified parameters to KnResultCollector (#773)
* fix(#772) refactored / simplified parameters to KnResultCollector

* added Teardown() call in VersionTest
2020-04-08 02:18:01 -07:00
Navid Shaikh d1eb9bcb71
Use vendored deps while running e2e locally (#783)
Also set GO111MODULE=on unconditionally
2020-04-07 16:26:08 -07:00
dr.max e524610b65
fix(769): various issues with godoc documents (#771) 2020-04-02 01:39:17 -07:00
dr.max df78b8b40c
(refactor) address the e2e extract / refactor of issue #763 (#765)
* (refactor) address the e2e extract / refactor of issue #763

* various updates to address reviewers feedback

* renamed lib/test/integration to lib/test and package to test
2020-04-01 09:21:18 -07:00
Navid Shaikh 062aeb9986
fix(e2e): Fix typos in TestBrokerTrigger (#747) 2020-03-19 01:14:06 -07:00
David Simansky 1b0e7124d7
fix(trigger): Fix filter delete for trigger update (#746) 2020-03-18 16:51:06 -07:00
David Simansky 58ee9c4788
fix(trigger): Make --filter flag truly optional (#745)
* fix(trigger): Make --filter flag truly optional

* fix(trigger): Update trigger docs

* chore: Update changelog
2020-03-18 06:39:06 -07:00
Murugappan Chetty a858a25135
e2e for service export (#739)
* e2e for service export

* e2e for service export

* e2e for service export

* e2e for service export

* e2e for service export
2020-03-17 15:29:05 -07:00
Ying Chun Guo 5ed62c801a
Verify "source ping describe" in ping e2e test (#727) 2020-03-11 00:32:29 -07:00
dr.max 2b9377d195
fixes(#606): adds --cluster-local / --no-cluster-local flags (#629)
When specified on 'service create' the '--cluster-local' flag will
make the created service 'private' by setting its config visibility
to 'cluster-local'. This is done with label:

serving.knative.dev/visibility: cluster-local

The --no-cluster-local will remove the label.
2020-03-10 14:24:29 -07:00
David Simansky 5ee9785b5f
fix(e2e): make local-e2e-tests.sh executable (#731) 2020-03-10 13:07:29 -07:00
David Simansky 8dbf4394a1
feat(trigger): add --inject-broker flag to trigger create command (#726)
* feat(trigger): annotate trigger to inject default broker

* chore: update changelog

* fix: reflect review feedback

* fix: code comment wording

* fix: reflect review feedback
2020-03-10 11:32:28 -07:00
Navid Shaikh 0d70b61615
chore(e2e): Support parsing int64 user id in test verification (#730) 2020-03-10 10:53:29 -07:00
Navid Shaikh ba7e14c807
feat(source): Add 'kn source list' (#666)
* feat(source): Add 'kn source list'

 Fixes #480
 - Add 'kn source list' listing the available sources COs
 - Use dynamic client to
       - find out available source types
       - find the COs in given namespace for each source type
 - Add --type flag to filter source list based on source type
 - Add unit tests
 - Add e2e tests
 - Add CHANGELOG entry

* Update group for ApiServerSource in tests

* Add kn duck source type for holding common eventing source fileds

 - Common infromation from sources are extracted into a struct
   for source list command output
 - Printer function picks the information from this struct object
   and doesn't know the details about extracting this info from multiple
   types of sources received
 - Group and Version for list is set to empty string and Kind to 'List',
   if printed a source list with multiple types of sources in machine readable
   format
 - Group, Version and Kind for list are kept intact if printed a source list
   with same type of source objects in machine readable format

* Update go.sum

* Add WithType builder for listing source

 - Separate the flags definition
 - WithType builder can be re-used to filter the source types
 - Add unit tests

* Update ApiServer source group to apiserversources.sources.knative.dev

* Fix typos and align

Co-authored-by: Roland Huß <roland@ro14nd.de>
2020-03-10 00:41:28 -07:00
Navid Shaikh 158c8f8980
fix(e2e): Restore local e2e test script (#708)
* fix(e2e): Restore local e2e test script

* Rename script to local-e2e-tests.sh and update test README
2020-03-09 10:46:32 -07:00
Matt Moore f9ccf36518
Format markdown (#710)
Produced via:
  `prettier --write --prose-wrap=always $(find -name '*.md' | grep -v vendor | grep -v .github)`
/assign maximilien rhuss
/cc maximilien rhuss
2020-03-09 09:19:28 -07:00
Navid Shaikh 34433f635e
fix(docs): Fix links to knative install and relative reference (#714)
- Setup Knative now points to https://knative.dev/docs/install/any-kubernetes-cluster/
 - Corrects the local link to docs/DEVELOPMENT.md
2020-03-09 08:05:28 -07:00
Roland Huß 46d5e60e42
refactor(source): Update to Knative eventing 0.13.0 (#705)
* chore(e2e): Optimized tests

Smoke Tests now run before the E2E tests, but in the same cluster

* chore: Removed unneeded test

* fix

* fix

* fix

* fix

* chore: Update to serving & eventing v0.13.0

* refactor(source): Update to Knative eventing 0.13.0

* Moved to "sources.knative.dev" API group
* Replaced CronJobSource with PingSource (and removed unsupported options for service account, requests limits)
* Move to versions:
  - SinkBinding v1alpha2
  - PingSource v1alpha2
  - ApiServerSource v1alpha1

* update to eventing 0.13.1

* go.sum fix

* fixed test

* test updates

* try to enhance error output

* fix test.

* update tests infra to 0.13.1
2020-03-06 13:47:27 -08:00
Ying Chun Guo e6c7d2859d
Add serviceaccount & resources config to cronjob source (#665)
Co-authored-by: Roland Huß <rhuss@redhat.com>
2020-03-04 00:51:53 -08:00
Navid Shaikh 136de19775
Re-enable markdown link check (#693)
* Re-enable markdown link check

 As https://github.com/raviqqe/liche/issues/33 is now fixed

* Update test-infra to latest
2020-03-03 09:22:53 -08:00
Navid Shaikh c1f3eb867b
fix(e2e): Update revision e2e tests (#696)
Fixes #695
 - Re-order revision tests operations to avoid any race condition that
   may cause.
2020-03-02 00:47:52 -08:00
Murugappan Chetty b95f40e2fe
add e2e for user flag (#692) 2020-02-29 09:22:52 -08:00
Ying Chun Guo ab00cc2969
fix for the failure of trigger e2e test (#690) 2020-02-28 02:36:51 -08:00
Ying Chun Guo d14c01fb5d
Allow configuration sink prefixes (#676) 2020-02-28 02:02:51 -08:00
Navid Shaikh 82381f36e4
chore(e2e): Increase e2e timeout to 45 minutes (#687)
Fixes #686

 - changed from 30m to 45m
2020-02-26 04:54:50 -08:00
Navid Shaikh e049ea9267
Disable markdown link check and enable presubmit test fail fast (#685)
sets `DISABLE_MD_LINK_CHECK=1` and `PRESUBMIT_TEST_FAIL_FAST=1`
2020-02-25 23:07:50 -08:00
Roland Huß c2dcb6b42d
chore(e2e): Minor cleanup (#670)
* chore(e2e): Minor cleanup

* chore(e2e): Remove t.Parallel() for the revision test

* chore: Some improvements wrt/ testing

* chore: fix formatting
2020-02-17 23:00:58 -08:00
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
wslyln 12d718e7af
Support multiple arguments on revision delete (#657)
* added multiple parameters to revision and added e2e test

* add to changelog

* fix changelog table

* fix warning message and revision test

* remove commented lines

* remove 'successfully' from revision output

* added requires one or more revision name

* remove absent revision pre check

* re add nonexist revision

* fixed tests
2020-02-13 22:45:40 -08:00
Navid Shaikh 3019f6813b
e2e: Dump stdout and describe ksvc (#659)
if the service create/update command execution failed
2020-02-12 09:41:22 -08:00