-
Notifications
You must be signed in to change notification settings - Fork 144
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: Implement ConfigUpdatesWithoutAffect #604
validation: Implement ConfigUpdatesWithoutAffect #604
Conversation
It proves that the process change after the But it does not prove other property changes, like 'env', 'mount' and the etc. To prove 'any change...', how about this:
|
Why not change I like @liangchenye's general approach though. Can we adjust our test helper to always clobber |
The process is already verified in this commit :) |
Do we want to keep that? |
You are right. When we use |
It looks like I need to write a new file for this test. |
c923c7b
to
06c5f15
Compare
@liangchenye @wking updated, PTAL. |
06c5f15
to
eab5b2f
Compare
inside testFor example, if we want to test if hostname updates will affect the container, we need to
Now It is the same approach when we check other updates. |
eab5b2f
to
2155a6f
Compare
@liangchenye @wking I updated this pr, and I added a runtimetest to test the But when I test it, it's going to quit when it's doing
|
@q384566678 I'm debugging it now. |
Seems you forget to copy 'runtimetest' to the bundle. |
2155a6f
to
4cf14f6
Compare
I try to put this test in RuntimeInsideValidate, but I found a problem, other tests are executed in call RuntimeInsideValidate, there is no guarantee that the config is correct, so when the start failure, cannot confirm is affected by the later config, was originally the config is wrong. |
util.Fatal(err) | ||
} | ||
|
||
testPath := filepath.Join(bundleDir, "test", "config.json") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The test directory is not created, maybe we can just use
testPath := filepath.Join(bundleDir, "test.json")
configPath := filepath.Join(bundleDir, "config.json") | ||
r.SetID(uuid.NewV4().String()) | ||
g := util.GetDefaultGenerator() | ||
g.SetProcessArgs([]string{"/runtimetest", "--path=" + testPath}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is already inside the bundle, so we can just use "--path=/test.json" or "--path=/test/config.json" .
The current implementation (commit#4cf14f6) is clearer to figure out the real problem of a runtime. |
36b24c7
to
3ae39dd
Compare
updated, I added properties to config.json. |
@liangchenye PTAL |
util.Fatal(err) | ||
} | ||
|
||
testPath := filepath.Join("/", "test", "config.json") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This rooted path fails when you use it for g.SaveToFile(…)
below:
$ ./validation/config_updates_without_affect.t
TAP version 13
open /test/config.json: no such file or directory
I agree with @liangchenye that you should set this path to something inside the bundle, at least for the host-mount-namespace SaveToFile
call.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated, thanks.
Signed-off-by: Zhou Hao <[email protected]>
3ae39dd
to
5d2dc61
Compare
Signed-off-by: Zhou Hao [email protected]