Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validation tests #336

Merged
merged 3 commits into from
Mar 22, 2017
Merged

Validation tests #336

merged 3 commits into from
Mar 22, 2017

Conversation

mrunalp
Copy link
Contributor

@mrunalp mrunalp commented Mar 6, 2017

This is an alternative to #326 that uses go tests.

The tests can be invoked as
RUNTIME=runc make localvalidation

@mrunalp
Copy link
Contributor Author

mrunalp commented Mar 6, 2017

@Mashimiao @liangchenye @wking PTAL

Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
@wking
Copy link
Contributor

wking commented Mar 6, 2017 via email

@Mashimiao
Copy link

We have merged #326, I think we can continue working on it

@mrunalp
Copy link
Contributor Author

mrunalp commented Mar 7, 2017

@hqhq @liangchenye @Mashimiao I think we should prefer this approach as it will be easier to write tests using go's testing support rather than building our own.

@Mashimiao
Copy link

Using Go's builtin test framework seems easier. But in my opinion, runtime-tools should be a tool set, runtime validation is one tool of it. Validating runtime by make seems not so formal.
@hqhq @liangchenye your opinions?

@liangchenye
Copy link
Member

Hi @mrunalp , I prefer to working on #326. So we can release a tool and running it directory.
The Go buildin test framework is easier, but I think changing them into a regular function and calling them does not cost much.

+func TestValidateBasic(t *testing.T) {
}

@mrunalp mrunalp added this to the 0.5 milestone Mar 15, 2017
@mrunalp
Copy link
Contributor Author

mrunalp commented Mar 17, 2017

@liangchenye @Mashimiao I think that rather than reworking this to use oci-runtime-tool runtime-validate, the approach in this PR is better as can directly access generate object and adjust it's properties. If we switch to command invocation then we will have to duplicate all options for generate to support test cases. A person executing the test case shouldn't care how this is implemented.

@wking
Copy link
Contributor

wking commented Mar 17, 2017 via email

@mrunalp
Copy link
Contributor Author

mrunalp commented Mar 17, 2017

@wking I was talking of an approach where we modify 336 to invoke oci-runtime-tool runtime-validate test case.

@wking
Copy link
Contributor

wking commented Mar 17, 2017 via email

@liangchenye
Copy link
Member

After discussion with @mrunalp and @Mashimiao , I'm fine with this solution. We can focus on test targets and don't need to distract by the framework at present

@liangchenye
Copy link
Member

liangchenye commented Mar 21, 2017

LGTM

Approved with PullApprove

1 similar comment
@Mashimiao
Copy link

Mashimiao commented Mar 22, 2017

LGTM

Approved with PullApprove

@Mashimiao Mashimiao merged commit 2f0b1a0 into opencontainers:master Mar 22, 2017
wking added a commit to wking/ocitools-v2 that referenced this pull request Mar 30, 2017
This reverts commit da62d5b.

The installable approach to runtime validation has been obsoleted by
the 'go test ...' approach from 24ca87f (Add tests for runtime
validation, 2017-03-06, opencontainers#336).  This commit drops the installable
tests so we don't have to maintain both.

Signed-off-by: W. Trevor King <wking@tremily.us>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants