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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

integration-cli: Skip tests which require daemon/cli to be on the same host #10889

Merged
merged 1 commit into from Feb 23, 2015

Conversation

Projects
None yet
7 participants
@ahmetb
Contributor

ahmetb commented Feb 19, 2015

Some integration-cli tests assume daemon and cli are running on the same host machine and therefore they examine side effects of executed docker commands on docker host by reading files or running other sort of commands.

In case of windows/darwin CLI tests these provide little or no value to CLI testing and should be OK to skip. There's another set of such tests I haven't skipped in this PR since those might be actually fixable with some workarounds but I think the following tests require daemon and cli to be on the same host machine.

List of skipped tests:

  • TestContainerNetworkMode
  • TestCpVolumePath
  • TestCreateVolumesCreated
  • TestBuildContextCleanup
  • TestBuildContextCleanupFailedBuild
  • TestLinksEtcHostsContentMatch
  • TestRmContainerWithRemovedVolume
  • TestRunModeIpcHost
  • TestRunModeIpcContainer
  • TestRunModePidHost
  • TestRunNetHost
  • TestRunDeallocatePortOnMissingIptablesRule
  • TestRunPortInUse
  • TestRunPortProxy
  • TestRunMountOrdering
  • TestRunModeHostname
  • TestRunDnsDefaultOptions
  • TestRunDnsOptionsBasedOnHostResolvConf
  • TestRunResolvconfUpdater
  • TestRunReuseBindVolumeThatIsSymlink 馃啎
  • TestRunVolumesNotRecreatedOnStart

Signed-off-by: Ahmet Alp Balkan ahmetalpbalkan@gmail.com
cc: @unclejack @tianon @jfrazelle @icecrime @crosbymichael

@@ -374,6 +374,8 @@ func TestCpUnprivilegedUser(t *testing.T) {
}
func TestCpVolumePath(t *testing.T) {

This comment has been minimized.

@tianon

tianon Feb 19, 2015

Member

It seems like only the bind-mounting parts of this are really "same host assuming", but that the rest of the "testing docker cp" logic is not only agnostic of that but would be useful client testing too -- do you think there'd be value in splitting this test instead?

This comment has been minimized.

@ahmetb

ahmetb Feb 19, 2015

Contributor

@tianon agreed. but the part you're gonna gain by splitting is what other cp tests like TestCpRelativePath, TestCpAbsolutePath, TestCpToDot are already testing?

This comment has been minimized.

@tianon

tianon Feb 23, 2015

Member

Ah, good point. 馃憤

@@ -15,6 +15,8 @@ import (
)
func TestLinksEtcHostsRegularFile(t *testing.T) {

This comment has been minimized.

@tianon

tianon Feb 19, 2015

Member

I'm confused -- which part of this test is assuming that the tests are running on the same host as the daemon?

This comment has been minimized.

@ahmetb

ahmetb Feb 19, 2015

Contributor

Oops this is a mistake. I probably added to the wrong one from my list. Thanks for catching. It should have been TestLinksEtcHostsContentMatch. Fix is coming...

@@ -1349,6 +1349,8 @@ func TestRunAddingOptionalDevices(t *testing.T) {
}
func TestRunModeHostname(t *testing.T) {

This comment has been minimized.

@tianon

tianon Feb 19, 2015

Member

This is another case where we have a clearly cli-testing useful test bundled together with a host-dependent test. Do you think there'd be value in splitting this one?

@@ -1488,7 +1491,7 @@ func TestRunDnsOptions(t *testing.T) {
}
func TestRunDnsOptionsBasedOnHostResolvConf(t *testing.T) {

This comment has been minimized.

@tianon

tianon Feb 19, 2015

Member

This test is definitely frightening, container or not, windows or not. 馃憤

This comment has been minimized.

@tianon

tianon Feb 19, 2015

Member

err, meant TestRunResolvconfUpdater, but really anything touching the host's /etc/resolv.conf is kind of scary since the slightest misstep there can lead to a host that can no longer perform DNS lookups 馃槦

This comment has been minimized.

@ahmetb

ahmetb Feb 20, 2015

Contributor

@tianon umm, yeah. it's good we skipped it, then, I guess? 馃槙

@tianon

This comment has been minimized.

Member

tianon commented Feb 19, 2015

Overall not a totally insane list -- I think some of these can be split up a little to improve our Windows test coverage too, but generally on a reasonable track IMO.

@jessfraz

This comment has been minimized.

Contributor

jessfraz commented Feb 20, 2015

SGTM

@LK4D4

This comment has been minimized.

Contributor

LK4D4 commented Feb 20, 2015

@tianon what's up here. LGTY?

@tianon

This comment has been minimized.

Member

tianon commented Feb 23, 2015

LGTM (although needs a rebase)

integ-cli: Skip tests assuming daemon/cli are on the same host
Some integration-cli tests assume daemon and cli are running
on the same machine and therefore they examine side effects
of executed docker commands on docker host by reading files
or running other sort of commands.

In case of windows/darwin CLI tests these provide little
or no value and should be OK to skip.

List of skipped tests:
- `TestContainerNetworkMode`
- `TestCpVolumePath`
- `TestCreateVolumesCreated`
- `TestBuildContextCleanup`
- `TestBuildContextCleanupFailedBuild`
- `TestLinksEtcHostsContentMatch`
- `TestRmContainerWithRemovedVolume`
- `TestRunModeIpcHost`
- `TestRunModeIpcContainer`
- `TestRunModePidHost`
- `TestRunNetHost`
- `TestRunDeallocatePortOnMissingIptablesRule`
- `TestRunPortInUse`
- `TestRunPortProxy`
- `TestRunMountOrdering`
- `TestRunModeHostname`
- `TestRunDnsDefaultOptions`
- `TestRunDnsOptionsBasedOnHostResolvConf`
- `TestRunResolvconfUpdater`
- `TestRunVolumesNotRecreatedOnStart`

Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
@ahmetb

This comment has been minimized.

Contributor

ahmetb commented Feb 23, 2015

@jessfraz

This comment has been minimized.

Contributor

jessfraz commented Feb 23, 2015

LGTM

@jessfraz

This comment has been minimized.

Contributor

jessfraz commented Feb 23, 2015

waiting on janky ;)

jessfraz pushed a commit that referenced this pull request Feb 23, 2015

Jessie Frazelle
Merge pull request #10889 from ahmetalpbalkan/win-cli/SameHostDaemon-鈥
鈥kips

integration-cli: Skip tests which require daemon/cli to be on the same host

@jessfraz jessfraz merged commit f6100a5 into moby:master Feb 23, 2015

1 check passed

janky Jenkins build Docker-PRs 1643 has succeeded
Details

@ahmetb ahmetb deleted the ahmetb:win-cli/SameHostDaemon-skips branch Feb 23, 2015

@ahmetb

This comment has been minimized.

Contributor

ahmetb commented Feb 23, 2015

鉂わ笍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment