Skip to content

Commit

Permalink
change integ test task cpu val
Browse files Browse the repository at this point in the history
  • Loading branch information
prateekchaudhry committed May 30, 2023
1 parent c7e3b86 commit 37f1f72
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
4 changes: 3 additions & 1 deletion agent/engine/common_integ_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -225,14 +225,16 @@ func skipIntegTestIfApplicable(t *testing.T) {
}
}

// Values in host resources from getTestHoustResources() should be looked at and CPU/Memory assigned
// accordingly
func createTestContainerWithImageAndName(image string, name string) *apicontainer.Container {
return &apicontainer.Container{
Name: name,
Image: image,
Command: []string{},
Essential: true,
DesiredStatusUnsafe: apicontainerstatus.ContainerRunning,
CPU: 1024,
CPU: 256,
Memory: 128,
}
}
Expand Down
12 changes: 6 additions & 6 deletions agent/engine/docker_image_manager_integ_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -568,23 +568,23 @@ func createImageCleanupHappyTestTask(taskName string) *apitask.Task {
Image: test1Image1Name,
Essential: false,
DesiredStatusUnsafe: apicontainerstatus.ContainerRunning,
CPU: 512,
CPU: 256,
Memory: 256,
},
{
Name: "test2",
Image: test1Image2Name,
Essential: false,
DesiredStatusUnsafe: apicontainerstatus.ContainerRunning,
CPU: 512,
CPU: 256,
Memory: 256,
},
{
Name: "test3",
Image: test1Image3Name,
Essential: false,
DesiredStatusUnsafe: apicontainerstatus.ContainerRunning,
CPU: 512,
CPU: 256,
Memory: 256,
},
},
Expand All @@ -603,23 +603,23 @@ func createImageCleanupThresholdTestTask(taskName string) *apitask.Task {
Image: test2Image1Name,
Essential: false,
DesiredStatusUnsafe: apicontainerstatus.ContainerRunning,
CPU: 512,
CPU: 256,
Memory: 256,
},
{
Name: "test2",
Image: test2Image2Name,
Essential: false,
DesiredStatusUnsafe: apicontainerstatus.ContainerRunning,
CPU: 512,
CPU: 256,
Memory: 256,
},
{
Name: "test3",
Image: test2Image3Name,
Essential: false,
DesiredStatusUnsafe: apicontainerstatus.ContainerRunning,
CPU: 512,
CPU: 256,
Memory: 256,
},
},
Expand Down
4 changes: 3 additions & 1 deletion agent/engine/engine_windows_integ_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,15 @@ var endpoint = utils.DefaultIfBlank(os.Getenv(DockerEndpointEnvVariable), docker
// TODO implement this
func isDockerRunning() bool { return true }

// Values in host resources from getTestHoustResources() should be looked at and CPU/Memory assigned
// accordingly
func createTestContainer() *apicontainer.Container {
return &apicontainer.Container{
Name: "windows",
Image: testBaseImage,
Essential: true,
DesiredStatusUnsafe: apicontainerstatus.ContainerRunning,
CPU: 512,
CPU: 256,
Memory: 256,
}
}
Expand Down

0 comments on commit 37f1f72

Please sign in to comment.