Skip to content

Conversation

thaJeztah
Copy link
Member

integration/container: TestKillDifferentUserContainer: adjust API version

TestKillDifferentUserContainer was migrated from integration-cli in
commit 0855922. Before migration, it
was not using a specific API version, so we can assume "current"
API version.

integration/container: TestInfoAPIVersioned: adjust API version

This test was using API version 1.20 to test old behavior, but the actual change
in behavior was API v1.25; see commit 6d98e34
and 63b5a37.
This updates the test to use API v1.24 to test the old behavior.

integration-cli: TestAPIClientVersionOldNotSupported: use daemon API version

Use the minimum API version as advertised by the test-daemon, instead of the
hard-coded API version from code.

integration(-cli): remove skips for old daemon versions (<20.10)

This removes various skips that accounted for running the integration tests
against older versions of the daemon before 20.10 (API version v1.41). Those
versions are EOL, and we don't run tests against them.

This reverts most of e440831, and similar
PRs.

- A picture of a cute animal (not mandatory but encouraged)

…sion

TestKillDifferentUserContainer was migrated from integration-cli in
commit 0855922. Before migration, it
was not using a specific API version, so we can assume "current"
API version.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This test was using API version 1.20 to test old behavior, but the actual change
in behavior was API v1.25; see commit 6d98e34
and 63b5a37.
This updates the test to use API v1.24 to test the old behavior.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
…version

Use the minimum API version as advertised by the test-daemon, instead of the
hard-coded API version from code.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This removes various skips that accounted for running the integration tests
against older versions of the daemon before 20.10 (API version v1.41). Those
versions are EOL, and we don't run tests against them.

This reverts most of e440831, and similar
PRs.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Comment on lines -1490 to +1451
if versions.LessThan(testEnv.DaemonAPIVersion(), "1.31") {
assert.Equal(c, *containerJSON.HostConfig.MemorySwappiness, int64(-1))
} else {
assert.Assert(c, containerJSON.HostConfig.MemorySwappiness == nil)
}
assert.Assert(c, containerJSON.HostConfig.MemorySwappiness == nil)
Copy link
Member Author

@thaJeztah thaJeztah Dec 5, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For reviewers; these conditions were changing the test based on version of the daemon (testEnv.DaemonAPIVersion() is the fixed API version supported by the daemon), and adjusting the test for bugs in older versions of the daemon (not so much "chances between API versions")

They were in place to allow running the integration tests against older versions of the daemon

@thaJeztah thaJeztah merged commit 2a38569 into moby:master Dec 5, 2023
@thaJeztah thaJeztah deleted the cleanup_api_versions branch December 5, 2023 09:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/testing kind/refactor PR's that refactor, or clean-up code status/2-code-review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants