Fixed more tests
This commit is contained in:
parent
412d777d1e
commit
49099f4c70
|
@ -50,6 +50,10 @@ func TestExecDriver_StartOpen_Wait(t *testing.T) {
|
|||
"command": "/bin/sleep",
|
||||
"args": []string{"5"},
|
||||
},
|
||||
LogConfig: &structs.LogConfig{
|
||||
MaxFiles: 10,
|
||||
MaxFileSizeMB: 10,
|
||||
},
|
||||
Resources: basicResources,
|
||||
}
|
||||
|
||||
|
@ -87,6 +91,10 @@ func TestExecDriver_KillUserPid_OnPluginReconnectFailure(t *testing.T) {
|
|||
"command": "/bin/sleep",
|
||||
"args": []string{"1000000"},
|
||||
},
|
||||
LogConfig: &structs.LogConfig{
|
||||
MaxFiles: 10,
|
||||
MaxFileSizeMB: 10,
|
||||
},
|
||||
Resources: basicResources,
|
||||
}
|
||||
|
||||
|
@ -144,6 +152,10 @@ func TestExecDriver_Start_Wait(t *testing.T) {
|
|||
"command": "/bin/sleep",
|
||||
"args": []string{"2"},
|
||||
},
|
||||
LogConfig: &structs.LogConfig{
|
||||
MaxFiles: 10,
|
||||
MaxFileSizeMB: 10,
|
||||
},
|
||||
Resources: basicResources,
|
||||
}
|
||||
|
||||
|
@ -188,6 +200,10 @@ func TestExecDriver_Start_Artifact_basic(t *testing.T) {
|
|||
"artifact_source": fmt.Sprintf("https://dl.dropboxusercontent.com/u/47675/jar_thing/%s?checksum=%s", file, checksum),
|
||||
"command": file,
|
||||
},
|
||||
LogConfig: &structs.LogConfig{
|
||||
MaxFiles: 10,
|
||||
MaxFileSizeMB: 10,
|
||||
},
|
||||
Resources: basicResources,
|
||||
}
|
||||
|
||||
|
@ -232,6 +248,10 @@ func TestExecDriver_Start_Artifact_expanded(t *testing.T) {
|
|||
"command": "/bin/bash",
|
||||
"args": []string{"-c", fmt.Sprintf("/bin/sleep 1 && %s", file)},
|
||||
},
|
||||
LogConfig: &structs.LogConfig{
|
||||
MaxFiles: 10,
|
||||
MaxFileSizeMB: 10,
|
||||
},
|
||||
Resources: basicResources,
|
||||
}
|
||||
|
||||
|
@ -278,6 +298,10 @@ func TestExecDriver_Start_Wait_AllocDir(t *testing.T) {
|
|||
fmt.Sprintf(`sleep 1; echo -n %s > ${%s}/%s`, string(exp), env.AllocDir, file),
|
||||
},
|
||||
},
|
||||
LogConfig: &structs.LogConfig{
|
||||
MaxFiles: 10,
|
||||
MaxFileSizeMB: 10,
|
||||
},
|
||||
Resources: basicResources,
|
||||
}
|
||||
|
||||
|
@ -324,6 +348,10 @@ func TestExecDriver_Start_Kill_Wait(t *testing.T) {
|
|||
"command": "/bin/sleep",
|
||||
"args": []string{"100"},
|
||||
},
|
||||
LogConfig: &structs.LogConfig{
|
||||
MaxFiles: 10,
|
||||
MaxFileSizeMB: 10,
|
||||
},
|
||||
Resources: basicResources,
|
||||
KillTimeout: 10 * time.Second,
|
||||
}
|
||||
|
|
|
@ -58,6 +58,10 @@ func TestJavaDriver_StartOpen_Wait(t *testing.T) {
|
|||
"jvm_options": []string{"-Xmx64m", "-Xms32m"},
|
||||
"checksum": "sha256:58d6e8130308d32e197c5108edd4f56ddf1417408f743097c2e662df0f0b17c8",
|
||||
},
|
||||
LogConfig: &structs.LogConfig{
|
||||
MaxFiles: 10,
|
||||
MaxFileSizeMB: 10,
|
||||
},
|
||||
Resources: basicResources,
|
||||
}
|
||||
|
||||
|
@ -103,6 +107,10 @@ func TestJavaDriver_Start_Wait(t *testing.T) {
|
|||
"artifact_source": "https://dl.dropboxusercontent.com/u/47675/jar_thing/demoapp.jar",
|
||||
"checksum": "sha256:58d6e8130308d32e197c5108edd4f56ddf1417408f743097c2e662df0f0b17c8",
|
||||
},
|
||||
LogConfig: &structs.LogConfig{
|
||||
MaxFiles: 10,
|
||||
MaxFileSizeMB: 10,
|
||||
},
|
||||
Resources: basicResources,
|
||||
}
|
||||
|
||||
|
@ -148,6 +156,10 @@ func TestJavaDriver_Start_Kill_Wait(t *testing.T) {
|
|||
Config: map[string]interface{}{
|
||||
"artifact_source": "https://dl.dropboxusercontent.com/u/47675/jar_thing/demoapp.jar",
|
||||
},
|
||||
LogConfig: &structs.LogConfig{
|
||||
MaxFiles: 10,
|
||||
MaxFileSizeMB: 10,
|
||||
},
|
||||
Resources: basicResources,
|
||||
}
|
||||
|
||||
|
|
|
@ -49,6 +49,10 @@ func TestQemuDriver_StartOpen_Wait(t *testing.T) {
|
|||
"web": 8080,
|
||||
}},
|
||||
},
|
||||
LogConfig: &structs.LogConfig{
|
||||
MaxFiles: 10,
|
||||
MaxFileSizeMB: 10,
|
||||
},
|
||||
Resources: &structs.Resources{
|
||||
CPU: 500,
|
||||
MemoryMB: 512,
|
||||
|
@ -101,6 +105,10 @@ func TestQemuDriver_RequiresMemory(t *testing.T) {
|
|||
"checksum": "sha256:a5e836985934c3392cbbd9b26db55a7d35a8d7ae1deb7ca559dd9c0159572544",
|
||||
// ssh u/p would be here
|
||||
},
|
||||
LogConfig: &structs.LogConfig{
|
||||
MaxFiles: 10,
|
||||
MaxFileSizeMB: 10,
|
||||
},
|
||||
}
|
||||
|
||||
driverCtx, execCtx := testDriverContexts(task)
|
||||
|
|
|
@ -61,6 +61,10 @@ func TestRawExecDriver_StartOpen_Wait(t *testing.T) {
|
|||
"command": testtask.Path(),
|
||||
"args": []string{"sleep", "1s"},
|
||||
},
|
||||
LogConfig: &structs.LogConfig{
|
||||
MaxFiles: 10,
|
||||
MaxFileSizeMB: 10,
|
||||
},
|
||||
Resources: basicResources,
|
||||
}
|
||||
testtask.SetTaskEnv(task)
|
||||
|
@ -109,6 +113,10 @@ func TestRawExecDriver_Start_Artifact_basic(t *testing.T) {
|
|||
"command": file,
|
||||
"args": []string{"sleep", "1s"},
|
||||
},
|
||||
LogConfig: &structs.LogConfig{
|
||||
MaxFiles: 10,
|
||||
MaxFileSizeMB: 10,
|
||||
},
|
||||
Resources: basicResources,
|
||||
}
|
||||
testtask.SetTaskEnv(task)
|
||||
|
@ -156,6 +164,10 @@ func TestRawExecDriver_Start_Artifact_expanded(t *testing.T) {
|
|||
"command": file,
|
||||
"args": []string{"sleep", "1s"},
|
||||
},
|
||||
LogConfig: &structs.LogConfig{
|
||||
MaxFiles: 10,
|
||||
MaxFileSizeMB: 10,
|
||||
},
|
||||
Resources: basicResources,
|
||||
}
|
||||
testtask.SetTaskEnv(task)
|
||||
|
@ -197,6 +209,10 @@ func TestRawExecDriver_Start_Wait(t *testing.T) {
|
|||
"command": testtask.Path(),
|
||||
"args": []string{"sleep", "1s"},
|
||||
},
|
||||
LogConfig: &structs.LogConfig{
|
||||
MaxFiles: 10,
|
||||
MaxFileSizeMB: 10,
|
||||
},
|
||||
Resources: basicResources,
|
||||
}
|
||||
testtask.SetTaskEnv(task)
|
||||
|
@ -243,6 +259,10 @@ func TestRawExecDriver_Start_Wait_AllocDir(t *testing.T) {
|
|||
"write", string(exp), outPath,
|
||||
},
|
||||
},
|
||||
LogConfig: &structs.LogConfig{
|
||||
MaxFiles: 10,
|
||||
MaxFileSizeMB: 10,
|
||||
},
|
||||
Resources: basicResources,
|
||||
}
|
||||
testtask.SetTaskEnv(task)
|
||||
|
@ -289,6 +309,10 @@ func TestRawExecDriver_Start_Kill_Wait(t *testing.T) {
|
|||
"command": testtask.Path(),
|
||||
"args": []string{"sleep", "45s"},
|
||||
},
|
||||
LogConfig: &structs.LogConfig{
|
||||
MaxFiles: 10,
|
||||
MaxFileSizeMB: 10,
|
||||
},
|
||||
Resources: basicResources,
|
||||
}
|
||||
testtask.SetTaskEnv(task)
|
||||
|
|
Loading…
Reference in a new issue