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`.
* 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
- Add e2e tests
- Use '=' for traffic and tag assignment instead of ':'
- Use --tag and --untag flags for tagging traffic targets
- Use --traffic flag for setting traffic portions
- Allow --traffic portion to either take revisionName or tagName
- Uses @latest identifier for referencing latest revision of service
- Dont throw error if requested revision=tag pair is same
- Support having multiple tags for a revision
- creates a new target in traffic block if revision present in traffic block with new tag requested
- creates N new targets in traffic block if revision absent in traffic block with Nxnew tags requested
- Ensure updating tag of @latest requires --untag flag
- streamline updating tag for latestReadyRevision
- adds respective tests
- adds tests for ensuring given traffic sum to 100 on CLI and fail fast
- Add note about preference of order in case where tagOfOneRevision == revisionOfAnother,
first tags are checked and assigned traffic if any, as tags are supposed to be
unique in traffic block and should be referenced in such scenario.
- Remove the examples from flag description, moves it to service update command example section
- Pass only traffic block to compute trffic, makes it better to consume.
- Cover more error cases for invalid value format for assignments, covers a=b=c, a=, =b, or variants of them
- Separate and improves the error messages
- Add unit tests for traffic computing
- Add sanity checks in dedicated function verifyInputSanity
- traffic perents should sum to 100
- individual percent should be in 0-100
- repetition of @latest or tagName or revisionRef is disallowed
- Verify traffic percents sum to 100 on client side and fail fast
- Add e2e tests for traffic splitting
- create and update service, assign tags and set traffic to make an existing state
- run the scenario on existing state of service
- form the desired state traffic block
- extract the traffic block and form the traffic block struct actual state
- assert.DeepEqual actual and desired traffic blocks
- Use logic to generate service name in the same way as namespace, use different service name per test case
- Run e2e test for traffic splitting in parallel
- Use timeout duration of 30m for e2e tests, use timeout parameter for go_test_e2e library function
- Use tagName in flag description of --untag, avoiding conflict with --tag flag
- Update CHANGELOG
* 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
* List revisions sorted by generation order
We use a configuration generation as a sort key, which is obtained from a label on configuration resource.
* Change column name from order to generation
* Fix revision sorting issue
* Fix revision e2e test
* Just sort by name if invalid type of generation found
* Update CHANGELOG
* 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
* test(service): Add e2e tests for min, max scale options
add e2e tests for min, max scale options for `service create` and
`service update` operations.
* Provision in tests for jsonpath to lookup old and new fields
- updates the validation of concurrency limits/targets with upcoming change to `service describe` output
- validation commands now returns specific field in output than returning complete output
- Renames service name used from hello to svc1
- Provision in tests for jsonpath to lookup old and new fields
- Consolidate once used helper method into test itself, as its checking for very specific test-case
* 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
* Validate invalid container concurrency options
* Use assert package
* Use FlagSet.Changed and don't care about default values
* Update dependency
* Follow e2e test changes
* Return error if invalid value is specified by users
* Fix broken e2e test
* Add more unit tests
* Fix error message
* Fix comment statement
* Revert back unrelated changes
* Fix typo
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.
* 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
* Add e2e tests for service with concurrency options
Check the behaviour of creating/updating service with concurrency options
* Move tests into separate test file and fix neats
* Use assert package for error check
* Change test function name
* 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
* Adds custom comparison for checking multiple substrings
This changeset introduces custom comparison for checking if a target
string has given multiple substrings, namely `ContainsMultipleSubstrings`.
Also removes `commands.TestContains` function and replaces all references
of `commands.TestContains` with `gotest.tools/assert.Check` function and
uses `ContainsMultipleSubstrings` as comparison function.
* Renames and makes the compare function variadic
New name: ContainsAll
New location: pkg/util/compare.go
Also the function now takes target string as first arg,
and accepts any number of substrings to check.
Removed the message arg, the compare function composes the error message.
For eg:
```
Actual output: foo-abcd foo <unknown> 0 OK / 0 <unknown> <unknown>
Missing strings: foo-abcd1, foo1
```
* Adds tests for compare utility ContainsAll
* Update vendor/modules.txt
- 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
* Removes pausing between e2e smoke tests
Removes time.Sleep as by default service create waits for it to
become ready. Also adds a command to create service in --async mode.
* Checks if service create in async mode is ready
also describes the async mode service and finally deletes it
* Adds kn revision delete command
* Adds unit tests for revision delete command
* Adds integration tests for revision delete command
Added revision delete command tests in new workflow namely
TestRevisionWorkflow.
* Removes extra line and renames an import alias
* Adds 10 seconds sleep between service create and revision delete
Also adds check for 'No resources found' while grabbing revision name.
* Clean up imports
* Removes the pause after service create
* Updates testing output strings in unit and e2e
* Updates post goimports on hack and test dirs
* 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
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
* fix(e2e): Use build.sh for compiling
Fixes#174.
* Update test/e2e-tests.sh
Co-Authored-By: Adriano Cunha <35786489+adrcunha@users.noreply.github.com>
* Tests running simple workflow in e2e
Fixes#104
* Adds e2e test for --force flag while creating service
also removes http:// before the registry name
* Removes the update command
* Adds the service update command back to e2e tests
also increases the sleep time between create and get
* Stub in an integration test
This just calls `kn service list` and verifies it doesn't have a
non-zero exit status.
* Build the client in pre_integration_tests
* Need to explicitly build the `kn` client
As opposed to just building the entire repo. That didn't actually
stick a `kn` binary in the root.
* Address code review feedback
Build the client in e2e-tests.sh instead of presubmit-tests.sh, fix a
couple copy/paste places that referred to eventing, remove unnecessary
knative_teardown function.
* Don't attempt to build kn twice
* Turns out pre_integration_tests() is the easiest way to build kn
We don't have any other good hooks at the moment to do something in
`e2e-tests.sh` that runs only once before the test cluster gets setup.
* Update test-infra to use the new cluster_setup function
This updates the version of test-infra to use the new cluster_setup
function added in https://github.com/knative/test-infra/pull/667
It simplifies our e2e setup logic into one place instead of being
split over presubmit-tests.sh and e2e-tests.sh
* Update vendored test-infra as well
* We have to explicitly tell CI to use the vendored modules
* Be a bit more descriptive in the stubbed out integration test