Skip to content
This repository has been archived by the owner on Sep 5, 2019. It is now read-only.

Update test documentation #395

Merged
merged 3 commits into from
Oct 5, 2018

Conversation

vdemeester
Copy link
Member

Taking from serving test/README(s), this updates the documentation
to run the unit tests and e2e tests locally.

/cc @shashwathi @imjasonh

Signed-off-by: Vincent Demeester [email protected]

test/README.md Outdated
@@ -0,0 +1,48 @@
# Test

This directory contains tests and testing dockes for `Knative Build`:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo: dockes

test/README.md Outdated

## Running end to end tests

To run [the e2e tests](./e2e) and [the conformance tests](./conformance), you need to have a running environment that meets
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This repo doesn't have conformance tests (yet)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh dang it, I though I removed it 😅

test/README.md Outdated
[the e2e test environment requirements](#environment-requirements), and you need to specify the build tag `e2e`.

```bash
go test -v -tags=e2e -count=1 ./test/e2e/... -count=1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Duplicate -count=1 flag

test/README.md Outdated

These tests require:

1. [A running `Knative Serving` cluster.](/DEVELOPMENT.md#getting-started)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't need Serving components to run Build tests, and our tests create the namespace for us so #2 is unnecessary.

test/README.md Outdated

### One test case

To run one e2e test case, e.g. TestAutoscaleUpDownUp, use [the `-run` flag with `go test`](https://golang.org/cmd/go/#hdr-Testing_flags):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This repo doesn't have TestAutoscaleUpDownUp, we should use TestSimpleBuild as an example instead.

test/README.md Outdated

kubectl label namespace build-tests istio-injection=enabled
```
3. A docker repo containing [the test images](#test-images)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Our tests don't have test images (yet), so this step can be removed.


`-count=1` is the idiomatic way to bypass test caching, so that tests will
always run.
Knative Serving e2e tests [test the end to end functionality of the Knative Serving API](#requirements) to verify the behavior of this specific implementation.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Serving -> Build

Taking from `serving` `test/README`(s), this updates the documentation
to run the unit tests and e2e tests locally.

Signed-off-by: Vincent Demeester <[email protected]>
@shashwathi
Copy link
Contributor

/ok-to-test

Copy link
Member

@imjasonh imjasonh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm
/approve

@knative-prow-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ImJasonH, vdemeester

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@imjasonh
Copy link
Member

imjasonh commented Oct 5, 2018

/test pull-knative-build-unit-tests

@shashwathi
Copy link
Contributor

I have added an issue to fix the unit tests

@knative-prow-robot knative-prow-robot merged commit 63825a3 into knative:master Oct 5, 2018
@vdemeester vdemeester deleted the update-test-doc branch October 5, 2018 17:59
@adrcunha
Copy link
Contributor

I would prefer adding a flag to e2e-tests.sh for running only the YAML or the go tests rather than duplicating code.

vdemeester added a commit to vdemeester/knative-build that referenced this pull request Apr 3, 2019
* Update test documentation

Taking from `serving` `test/README`(s), this updates the documentation
to run the unit tests and e2e tests locally.

Signed-off-by: Vincent Demeester <[email protected]>

* Add e2e YAML tests documentation and (local) script

Signed-off-by: Vincent Demeester <[email protected]>

* Update README.md
vdemeester added a commit to vdemeester/knative-build that referenced this pull request Apr 3, 2019
* Update test documentation

Taking from `serving` `test/README`(s), this updates the documentation
to run the unit tests and e2e tests locally.

Signed-off-by: Vincent Demeester <[email protected]>

* Add e2e YAML tests documentation and (local) script

Signed-off-by: Vincent Demeester <[email protected]>

* Update README.md
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants