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.
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.
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.
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 directoryI agree with @liangchenye that you should set this path to something inside the bundle, at least for the host-mount-namespace SaveToFile call.
Signed-off-by: Zhou Hao <zhouhao@cn.fujitsu.com>
3ae39dd to
5d2dc61
Compare
Signed-off-by: Zhou Hao zhouhao@cn.fujitsu.com