Skip to content
This repository has been archived by the owner on Oct 13, 2023. It is now read-only.

[18.09 backport] Cleanup volume integration tests #109

Merged

Conversation

thaJeztah
Copy link
Member

Backport of moby#38133 for 18.09

The last commit depends on #80, so built this PR on top of that PR

git checkout -b 18.09_backport_cleanup_volume_tests ce-engine/18.09
git cherry-pick -s -S -x 8e8cac82637952d49f8df42a3164478f13978c90
git cherry-pick -s -S -x 05e18429cf50afbc40456a6f4eff1cfd6f1da707
git cherry-pick -s -S -x b334198e652b503d432832ec6f4faab7707d0eb4
git push -u origin

cherry-pick was clean; no conflicts

vdemeester and others added 6 commits November 8, 2018 13:55
- Add windows CI entrypoint script.

Signed-off-by: John Howard <jhoward@microsoft.com>
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
(cherry picked from commit d3cc071)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Salahuddin Khan <salah@docker.com>
(cherry picked from commit 4c8b1fd)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Deep Debroy <ddebroy@docker.com>
(cherry picked from commit 7d1c1a4)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Some improvements in this test;

- use the volume-information that's returned by VolumeCreate as "expected"
- don't use an explict name for the volume, as it was only used to reference
  the volume for inspection
- improve the test-output on failure, so that "expected" and "actual" values
  are printed

Without this patch applied;

    === RUN   TestVolumesInspect
    --- FAIL: TestVolumesInspect (0.02s)
     	volume_test.go:108: assertion failed: false (bool) != true (true bool): Time Volume is CreatedAt not equal to current time
    FAIL

With this patch applied;

    === RUN   TestVolumesInspect
    --- FAIL: TestVolumesInspect (0.02s)
        volume_test.go:95: assertion failed: expression is false: createdAt.Truncate(time.Minute).Equal(now.Truncate(time.Minute)): CreatedAt (2018-11-01 16:15:20 +0000 UTC) not equal to creation time (2018-11-01 16:15:20.2421166 +0000 UTC m=+13.733512701)
    FAIL

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 8e8cac8)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 05e1842)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
These tests don't seem to have anything Linux-specific,
so enable them on Windows

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit b334198)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Copy link

@andrewhsu andrewhsu left a comment

Choose a reason for hiding this comment

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

LGTM

@andrewhsu andrewhsu merged commit 4980e48 into docker-archive:18.09 Nov 14, 2018
@thaJeztah thaJeztah deleted the 18.09_backport_cleanup_volume_tests branch November 14, 2018 23:47
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants