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

Create presubmit and end-to-end test infrastructure #25

Merged
merged 1 commit into from
Jul 2, 2018
Merged

Create presubmit and end-to-end test infrastructure #25

merged 1 commit into from
Jul 2, 2018

Conversation

adrcunha
Copy link
Contributor

Partially addresses #16.

Notes:

Notes:
* Build and unit tests are currently placeholders for the real stuff (see #22 and #23).
* `run_buildpack_test()` is the only end-to-end test, and it doesn't actually check results (see #24).
@adrcunha adrcunha requested a review from vaikas June 27, 2018 23:33
@google-prow-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: adrcunha
To fully approve this pull request, please assign additional approvers.
We suggest the following additional approver: mattmoor

Assign the PR to them by writing /assign @mattmoor in a comment when ready.

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

@adrcunha adrcunha requested review from imjasonh and removed request for vaikas June 27, 2018 23:34
@@ -0,0 +1,8 @@
# The OWNERS file is used by prow to automatically merge approved PRs.

approvers:
Copy link
Member

Choose a reason for hiding this comment

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

Can you add me and mattmoor as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You and Matt are already owners because you're in the top level OWNERS file. Adding you here is unnecessary redundancy.


This directory contains tests and testing docs.

* [Unit tests](#running-unit-tests) currently reside in the codebase alongside the code they test
Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure it ever makes sense to run unit tests, to be honest. The intention of this repo is to be a catalog of reusable templates, and not to include any actual code.

Maybe someday we'll host the source for certain "official" builder images here too, and those might have unit tests? But for the foreseeable future, I don't expect us to have any.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok, the wording is not the best here, since we won't have real code. But I can see "template validation" as unit tests, for example, and would love to see them here. It would run quickly and guard the templates against breakage. WDYT?

spec:
source:
git:
url: https://github.com/my-user/my-repo
Copy link
Member

Choose a reason for hiding this comment

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

Is the intention that this is a real repo containing buildpack-buildable source, and we'll watch the build to complete successfully? That seems like something we might just want to move into the build repo, where we already have testing infrastructure for that.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The test I wrote is basically the instructions in the README file, so I could have something in place here that could do same basic validation of a template in the repo (and show how the e2e-tests.sh script can be used). I expect that real tests will be added later, thus I filed #22, #23 and #24.

@adrcunha
Copy link
Contributor Author

Oh, please note that without presubmit tests we can't have test jobs and thus can't have Prow to automatically merge PRs.

@evankanderson
Copy link
Member

/assign @imjasonh

@imjasonh imjasonh merged commit 1c68e89 into knative:master Jul 2, 2018
@adrcunha adrcunha deleted the presubmit branch July 2, 2018 23:53
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants