add more test cases for default runtime validation#512
Merged
liangchenye merged 1 commit intoopencontainers:masterfrom Nov 16, 2017
Merged
add more test cases for default runtime validation#512liangchenye merged 1 commit intoopencontainers:masterfrom
liangchenye merged 1 commit intoopencontainers:masterfrom
Conversation
liangchenye
reviewed
Nov 15, 2017
|
|
||
| // Test whether mounts are correctlt mounted | ||
| func TestValidateMounts(t *testing.T) { | ||
| // TODO mounts generation options have not been implemented |
Member
There was a problem hiding this comment.
we can add this test when 'mounts generate' will be done.
liangchenye
reviewed
Nov 15, 2017
| // Test whether rootfs Readonly can be applied or not | ||
| func TestValidateRootFS(t *testing.T) { | ||
| g := getDefaultGenerator() | ||
| g.SetRootReadonly(true) |
Member
There was a problem hiding this comment.
Maybe we can add another test like:
g.SetRootReadonly(false)
f78072c to
bad62c8
Compare
wking
reviewed
Nov 15, 2017
| // Test whether rootfs Readonly can be applied as true | ||
| func TestValidateRootFS(t *testing.T) { | ||
| g := getDefaultGenerator() | ||
| g.SetRootReadonly(true) |
Contributor
There was a problem hiding this comment.
I think we need to skip this on Windows, where the spec forbids setting readonly to true. Also, you probably need to use more-specific function names:
$ git grep '^func TestValidateRootFS' origin/pr/512
origin/pr/512:validation/validation_test.go:func TestValidateRootFS(t *testing.T) {
origin/pr/512:validation/validation_test.go:func TestValidateRootFS(t *testing.T) {
wking
reviewed
Nov 15, 2017
| assert.Nil(t, runtimeInsideValidate(g)) | ||
| } | ||
|
|
||
| // Test whether mounts are correctlt mounted |
Contributor
There was a problem hiding this comment.
“correctlt” → “correctly”. Or just use // Validate mounts, or leave the comments off? TestValidateMounts sounds pretty clear to me even without a comment.
bad62c8 to
5ca723e
Compare
Author
|
updated. @wking @liangchenye @q384566678 PTAL |
5ca723e to
16bc903
Compare
Member
zhouhao3
reviewed
Nov 16, 2017
| } | ||
| } else { | ||
| err := testWriteAccess("/") | ||
| if err == nil { |
16bc903 to
5557d36
Compare
Signed-off-by: Ma Shimiao <mashimiao.fnst@cn.fujitsu.com>
1 similar comment
Member
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Signed-off-by: Ma Shimiao mashimiao.fnst@cn.fujitsu.com