Skip to content

Update test/adding_tests.md#6345

Merged
knative-prow-robot merged 1 commit intoknative:masterfrom
MIBc:dev-master
Jan 7, 2020
Merged

Update test/adding_tests.md#6345
knative-prow-robot merged 1 commit intoknative:masterfrom
MIBc:dev-master

Conversation

@MIBc
Copy link
Copy Markdown
Contributor

@MIBc MIBc commented Dec 27, 2019

Update test/adding_tests.md and test/README.md

Fixes #6239

Proposed Changes

  • update code example
  • update import path

@googlebot googlebot added the cla: yes Indicates the PR's author has signed the CLA. label Dec 27, 2019
@knative-prow-robot knative-prow-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Dec 27, 2019
@knative-prow-robot
Copy link
Copy Markdown
Contributor

Hi @MIBc. Thanks for your PR.

I'm waiting for a knative member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@knative-prow-robot knative-prow-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Dec 27, 2019
@knative-prow-robot knative-prow-robot added the area/test-and-release It flags unit/e2e/conformance/perf test issues for product features label Dec 27, 2019
@MIBc
Copy link
Copy Markdown
Contributor Author

MIBc commented Dec 27, 2019

/assign @adrcunha

Copy link
Copy Markdown
Contributor

@adrcunha adrcunha left a comment

Choose a reason for hiding this comment

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

Thanks for updating the docs, just a few minor things.

/ok-to-test

Comment thread test/adding_tests.md Outdated
Comment thread test/adding_tests.md Outdated
Comment thread test/adding_tests.md
@knative-prow-robot knative-prow-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Dec 27, 2019
Comment thread test/adding_tests.md Outdated
your existing [environment setup](../DEVELOPMENT.md#setup-your-environment).

By importing `github.com/knative/serving/test` you get access to a global
By importing `knative.dev/pgk/test` you get access to a global
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
By importing `knative.dev/pgk/test` you get access to a global
By importing `knative.dev/pkg/test` you get access to a global

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

done

Comment thread test/README.md
- [`--tag`](#using-a-docker-tag)
- [`--ingressendpoint`](#using-a-custom-ingress-endpoint)
- [All flags added by `knative/pkg/test`](https://github.com/knative/pkg/tree/master/test#flags) such as:
- [`--dockerrepo`](#overriding-docker-repo)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should these be on the same indentation level as the last three flags?

Copy link
Copy Markdown
Contributor Author

@MIBc MIBc Jan 3, 2020

Choose a reason for hiding this comment

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

I think knative/pkg/test flag and knative/serving/test flag can be same level.
The --dockerrepo, --tag, --ingressendpoint belong to knative/pkg/test. They are subset of knative/pkg/test flag.
The last three flags are special flag for knative/serving/test.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Ah got it. Thanks for the clarification!

Comment thread test/adding_tests.md
- `Istio objects`

For example, to create a `Route`:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This line needs to be updated:

_, err = clients.ServingClient.Routes.Create(test.Route(namespaceName, routeName, configName))

-->

_, err = clients.ServingClient.Routes.Create(v1test.Route(
  test.ResourceNames{
	  	Route:  routeName,
	  	Config: configName,
  	}))

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

done

Comment thread test/adding_tests.md Outdated

```go
err = test.WaitForRouteState(clients.ServingClient, routeName, test.AllRouteTrafficAtRevision(routeName, revisionName))
err := v1alpha1testing.WaitForRouteState(clients.ServingClient, routeName, v1alpha1testing.AllRouteTrafficAtRevision(routeName, revisionName))
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This needs to be updated because AllRouteTrafficAtRevision takes type ResourceNames as the argument.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

done

Comment thread test/adding_tests.md Outdated

```go
err := test.WaitForRevisionState(clients.ServingClient, revisionName, test.IsRevisionReady(revisionName))
err := v1alpha1testing.WaitForRevisionState(clients.ServingClient, revisionName, v1alpha1testing.IsRevisionReady(revisionName))
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This needs to be updated because IsRevisionReady takes the revision object as the argument, not the name

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

done

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The WaitForRevisionState also need to be updated.

@knative-prow-robot knative-prow-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jan 3, 2020
Update test/adding_tests.md and test/README.md

Fixes knative#6239
@MIBc
Copy link
Copy Markdown
Contributor Author

MIBc commented Jan 5, 2020

Do you have any other comments? @adrcunha

@adrcunha
Copy link
Copy Markdown
Contributor

adrcunha commented Jan 6, 2020

Do you have any other comments? @adrcunha

I don't, so I'm approving. I'll let @taragu LGTM.

/approve

@knative-prow-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: adrcunha, MIBc

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

The pull request process is described here

Details 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

@knative-prow-robot knative-prow-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 6, 2020
@taragu
Copy link
Copy Markdown
Contributor

taragu commented Jan 7, 2020

/lgtm
Thanks @MIBc for the PR!

@knative-prow-robot knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Jan 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. area/test-and-release It flags unit/e2e/conformance/perf test issues for product features cla: yes Indicates the PR's author has signed the CLA. lgtm Indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test/adding_tests.md is outdated

6 participants