Commit Graph

1263 Commits

Author SHA1 Message Date
Martin Gencur 60567a9e37 Integration tests for Tekton (#528)
* Integration tests for Tekton

* Use knative/client instead of fork

* also put back the e2e-tests into its original format where it doesn't
run the tekton tests

* Run ./hack/build.sh with Go 1.12

* Pull buildah and kn tasks directly from catalog

* Revert "Use knative/client instead of fork"

This reverts commit 2ab272f587.

* Revert "Revert "Use knative/client instead of fork""

This reverts commit f14c2105e2.

* Update Tekton to 0.8.0

* Revert "Use knative/client instead of fork"

This reverts commit 2ab272f587.

* Use knative/client instead of fork

This reverts commit 8eb87ada02.

* Export variables after calling initialize

* Run against arbitrary Docker registry

* Conditionally install Tekton

* Use knative/client instead of fork

This reverts commit 3800adbf69.

* Revert "Use knative/client instead of fork"

This reverts commit 71a3d33b5a.

* Simplify passing the flag to test

* Simplify imports
2019-12-06 05:03:39 -08:00
Adriano Cunha 556f457e06 Update test-infra (#529)
Major changes:
* fix monitoring install function
* fix build tests not failing on module updates
2019-12-03 10:27:35 -08:00
Navid Shaikh 339232b795 fix(e2e): Removes explicit timeout flag in smoke tests (#523)
Fixes #507

 - removes `--wait-timeout` flag, was set to 240 seconds which is lesser than the default timeout (600 seconds)
 - removes duplication of namespace flag in another smoke test command
2019-11-29 04:36:22 -08:00
Murugappan Chetty b64f70c593 tests: Use mock kn client tests for service list and delete (#527)
* refactor delete service unit test with mock kn client (#358)

* refactor list svc unit test with mock kn client (#358)

* refactor list svc unit test with mock kn client (#358)

* fix review comments for pr 527 (#358)

* fix review comments for pr 527 (#358)
2019-11-29 01:40:22 -08:00
Navid Shaikh 8de8e58de8 tests: Avoid downloading deps in unit tests (#525)
- Uses custom `unit_tests` function in presubmit-tests.sh to run unit tests
 - Custom function adds a flag `-mod=vendor` in addition to default unit tests runner
 - The deps are already downloaded part of the source repo, mentioned flag uses it (vendor dir)
   and avoids downloading the deps afresh
 - This prevents(in unit tests) the flake we see 'go: error loading module requirements' which occurs
   due to download error
2019-11-29 00:46:23 -08:00
Navid Shaikh 7024933f0a fix(e2e): Removes workaround for ensuring LCR=LRR at client side (#524)
Related to #500

 - The fix for serving#6060 merged (serving#6069), removing the workaround
   at client side e2e tests for additional LCR=LRR check after service update return.
 - Now we expect service status to have LCR=LRR if the service's conditions turned True after last update.
2019-11-28 00:40:22 -08:00
chaodaiG 0efde628cb Remove explicit flag parsing so that it works with go1.13 (#522) 2019-11-27 22:13:22 -08:00
Ying Chun Guo 37d27782a5 add common codes for sources client (#514) 2019-11-27 00:50:21 -08:00
Naomi Seyfer e07b5a98b5 In waiting for ready, watch falls back to polling. (#491)
* Fall back to polling-based watcher

* Tests pass, much cleaner

* tests and fixes for polling watcher

* Clean up a lil

* lint

* Nits

* build -u
2019-11-19 22:48:08 -08:00
Roland Huß cadc2d3acf chore(build): Spacing fix for newer iTerm (>=3.3.7) (#509) 2019-11-19 05:12:07 -08:00
Navid Shaikh 5b7a714021 chore(e2e): Run e2e against latest released serving version v0.10.0 (#501)
- This changeset updates serving version for pull-knative-client-integration-tests-latest-release
 - Serving nightly release is tested in prow job pull-knative-client-integration-tests
2019-11-19 03:52:08 -08:00
Navid Shaikh 35667391ae Verify service status before verifying traffic targets (#508)
- Verify service status LCR=LCR before verifying traffic targets
 - Retry 5 times with 2 seconds delay, else fail the tests
2019-11-19 02:50:07 -08:00
Roland Huß 48797269ed chore: Add version information of eventing (#495)
* chore: Add version information of eventing

Adding sources.eventing.knative.dev to version info (the only eventing API)
for now as this will be the first one used.

* chore(version): Add grouping for API versions
2019-11-19 02:20:07 -08:00
Ying Chun Guo d116fb9422 shorten the --log-http Authorization mask value (#484) 2019-11-18 13:08:07 -08:00
Adriano Cunha 764e8c933e Update vendor/knative.dev/test-infra (#503) 2019-11-15 09:54:02 -08:00
Navid Shaikh 1bcec16b24 Uses BYO revision names for traffic splitting e2e tests (#506)
* Uses BYO revision names for traffic splitting e2e tests

 - Avoid getting the revision name after service create/update using LCR or LRR from service status

* Pauses 3 seconds before verifying actual vs expected traffic targets

 - for traffic splitting e2e tests
 - Check the comment on https://github.com/knative/client/issues/500#issuecomment-554355688
2019-11-15 07:36:02 -08:00
Navid Shaikh 619b64cbb3 chore(docs): Updates basic workflow doc (#502)
- Updated to reflect the service create/update/describe/delete output
2019-11-13 05:16:27 -08:00
Ying Chun Guo 5fc8197028 Support multiple NAMEs on service delete (#492)
* Support multiple NAMEs on service delete

* add e2e test
2019-11-12 03:02:23 -08:00
Roland Huß 73c7ae9ae5 chore: Add some clarification to the pull request template for where to put CHANGELOG entries (#494) 2019-11-12 02:14:23 -08:00
Navid Shaikh cf40c25657 Separates cross compile in hack/build.sh from default flow (#489)
- `./hack/build.sh` performs usual flow of codegen, build and test
 - `./hack/build.sh -x` only compiles cross platform
 - Updates hack/build.sh help message to reflect this
2019-11-12 01:58:22 -08:00
Navid Shaikh c4a919718d Add completion to help message (#478)
Fixes #477
2019-11-12 01:32:23 -08:00
Ying Chun Guo d66887a310 Add dependencies to Eventing 0.9.0 (#470) 2019-11-12 00:41:22 -08:00
dr.max 1f27ecaa92 removes remaining references to 'lookup-plugins-in-path' (#481) 2019-11-11 09:56:21 -08:00
Roland Huß ad02647ddc chore: Update to k8s 1.15.5 and fixing go.sum error (#493) 2019-11-11 02:00:20 -08:00
Roland Huß 07743f8dab chore: Update testing infrastructure (#488) 2019-11-07 06:29:56 -08:00
Doug Davis 39b7313fb0 Improve error message (#486)
While testing I specified this on the `kn` command line:

```
./kn service create echo --concurrency-limit=1 --concurrency-target=1 --env foo=bar --limits-cpu=1000m --limits-memory=1024m --max-scale=1 --min-scale=1 --port=9999 --requests-cpu=250m --requests-memory=64mi --image duglin/echo
```
and it returned:
```
unable to parse quantity's suffix
```

I had no idea which value it didn't like. So this PR makes it so the output
is now this:
```
Error parsing "64mi": unable to parse quantity's suffix
```

Still not perfect since I still had to think way too hard to realize that it
didn't like the lower-case `m`, but that's a different issue.

Signed-off-by: Doug Davis <dug@us.ibm.com>
2019-11-06 13:21:03 -08:00
Navid Shaikh 22c65d65ef chore: Prep for v0.10.0 release (#483)
- Update CHANGELOG
2019-11-06 05:24:02 -08:00
Ingwon Song 9d759ca6e4 Add support for envFrom and volumeMounts (#393)
* Add support for envFrom, volumeMounts, serviceAccountName, and imagePullPolicy

* Add comments for added functions

* Add test functions for --env-from

* Add test functions for --volume-mount

* Add test functions for --service-account-name and --image-pull-policy

* Add testing functions to cover the case "service update --env-from"

* Add test functions to cover the case "service update --volume-mount"

* Add missing test functions for config_changes.go

* Add testing functions for pkg/util/parsing_helper.go

* Fix a bug on a test case, caused by ignoring random orderedness of map

* Remove image-pull-policy because it is not supported by Knative

* Fix comments to clarify it as well as to fix a typo

* Remove service-account-name flags in order to submit it as a seperate PR

* Split --volume-mount flag into --volume-mount and --volume flags in order to enable multiple times mounting for the same volume

* Change the name of local variable to simplify

* Update docs

* Change the flag "--volume-mount" into "--mount", and fix it to make volume automatically when the config-map or secret is directley used. In addition, the test cases are changed to new unit test style. To keep the original orderedness given via flags, OrderedMap implementation is added as well

* Fix usage descriptions for the mount flag

* Factor out the name existence checking from createEnvFromSource

* Fix the usage description for --mount

* Sanitize a generated volume name
2019-11-06 04:15:03 -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
Ying Chun Guo c5b3f7af0d add serviceaccount to service describe (#472) 2019-11-05 03:11:25 -08:00
Navid Shaikh 44dafbd780 Adds zsh completion (#476)
* Adds zsh completion

 - Adds back zsh completion after vendoring cobra library with a fix
 - Updates the command definition to accept argument either of ['bash', 'zsh']
 - Moves the completion command definition under `pkg/kn/commands/completion`
 - Updates docs
 - Updates CHANGELOG.adoc

* fix(golint): exported function should have comment

* Fixes PR number in CHANGELOG.adoc

* Updates unit tests
2019-11-05 02:42:25 -08:00
dr.max 7ffa49f72d fix English typo: 'an equally' instead of 'a equally' (#469) 2019-11-05 00:40:24 -08:00
Roland Huß d8d0192206 chore: Update to Knative Serving 0.10.0 (#474)
* chore: Update to Knative Serving 0.10.0

* chore: Add missing dep, introduced by codegen test (when installing goimports)

* added missing target dir
2019-11-04 13:02:19 -08:00
Navid Shaikh a269d2910d Adds kn nightly and latest release image URL in docs (#466)
* Nightly: `gcr.io/knative-nightly/knative.dev/client/cmd/kn`
 * Latest release: `gcr.io/knative-releases/knative.dev/client/cmd/kn`
2019-10-31 00:51:12 -07:00
Navid Shaikh dd5b05cd42 Updates spf13/cobra dep to v0.0.5 (#443)
* Updates spf13/cobra dep to v0.0.5

 Fixes #426

 - and a couple of patches on top which aren't merged yet
 	- spf13/cobra#884
	- spf13/cobra#899
 - also updates viper to 1.4.0

* Updates to go.sum

* Updates go.mod

 as a result of `go install golang.org/x/tools/cmd/goimports`
2019-10-30 03:31:11 -07:00
Roland Huß 4ab869aecf chore: Final preps for 0.9.0 release (#463)
* chore: Final preps for 0.9.0 release

* chore: Update knative dependency in `kn version`
2019-10-29 11:19:12 -07:00
Naomi Seyfer aafdb9a238 Refactor describe: printing levels and shared kn code (#430)
* Refactor describe: printing levels and shared kn code

* Test this refactor more

* Comments
2019-10-29 03:08:11 -07:00
Roland Huß b871112e1f chore: Update changelog in prep for 0.8.0 (#461)
Added missing PRs with some substantial change, sorted list from newer to older PRs.
2019-10-29 01:22:11 -07:00
Navid Shaikh a32f5666b5 Vendors serving v0.9.0 (#458)
* Vendors serving v0.9.0

* Updates references per serving v0.9.0 vendoring

 - Updates code and tests to refer the required data structure and method/function calls
 - duckv1beta1 -> duckv1 conditions
 - traffic percent value is now *int64
 - containerConcurrency validation method relocation

* fix(golint): exported function should have comment

 for NonReadyConditionReason function

* Updates check for removing null targets

 fixes the pointer value check

* Updates per review comments
2019-10-27 22:22:36 -07:00
Ying Chun Guo 492f1dce76 add revision information to service list (#441) 2019-10-25 02:40:35 -07:00
dr.max 462973c51f removes zsh completion since it does not work (fixes #426) (#439) 2019-10-23 00:43:27 -07:00
Gong Zhang f77c034c4a Refine route list output (#407)
- Only show NAME/URL/READY

[issue 350](https://github.com/knative/client/issues/350)
2019-10-22 23:33:27 -07:00
Navid Shaikh df04573590 fix(version): Displays supported APIs and version (#453)
* fix(version): Displays supported APIs and version

 Fixes #404

 ```
  ./kn version
Version:      v20191017-local-6328a73-dirty
Build Date:   2019-10-17 09:55:55
Git Revision: 6328a73
Supported APIs:
- serving.knative.dev/v1alpha1 (knative-serving v0.8.0)
 ```

* Removes ServingVersion feeding from ldflags

 - hardcodes the supported APIs as they're supposed to be updated when we bump deps

* Fixes typo in e2e tests

* Uses array for deterministic order of printing supported APIs
2019-10-18 03:35:18 -07:00
Navid Shaikh f03508f74a Adds go mod tidy to update dependencies function hack/build.sh (#455)
- Added `go mod tidy` before `go mod vendor` command
2019-10-17 23:33:18 -07:00
Navid Shaikh 96c8028de1 fix(e2e): Improves the error message upon mismatch of traffic targets (#454)
* fix(e2e): Improves the error message upon mismatch of traffic targets

 Fixes #434
 - The error message now prints the expected/actual length of traffic targets
 - Also prints the actual traffic targets

* Fixes Golint errors

  Golint errors: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...).
2019-10-17 09:32:16 -07:00
Navid Shaikh 73dfd21d21 chore: go mod tidy updates (#450)
Generated by
 ```
 go mod tidy -v
 ```

 Fixes #449
2019-10-16 12:57:15 -07:00
Roland Huß 6328a73c98 fix(service): Set default timeout for update to the same value as for create (#446)
Also, added accidentally removed seperator lines during create/update
2019-10-16 04:51:15 -07:00
Navid Shaikh 039cdfcc09 fix(e2e): Uses serving v0.8.1 in custom prow job (#452)
s/v0.7.1/v0.8.1
2019-10-16 03:16:15 -07:00
Ying Chun Guo a252829ceb fix a small error in verify-codegen.sh (#451) 2019-10-16 02:39:15 -07:00