-
Notifications
You must be signed in to change notification settings - Fork 18.9k
Open
Labels
area/pluginsarea/testingkind/enhancementEnhancements are not bugs or new features but can improve usability or performance.Enhancements are not bugs or new features but can improve usability or performance.
Description
I noticed that the plugin integration tests install plugins from the Hub:
pName = "tiborvass/sample-volume-plugin"
pTag = "latest"
pNameWithTag = pName + ":" + pTag
...
func (s *DockerSuite) TestPluginBasicOps(c *check.C) {
testRequires(c, DaemonIsLinux, IsAmd64, Network)
_, _, err := dockerCmdWithError("plugin", "install", "--grant-all-permissions", pNameWithTag)
c.Assert(err, checker.IsNil)
...I see a few problems with this:
- Use of the Hub means a service outage or transient network issue will make the test appear flaky. We've had this problem with some pull tests before, and have tried to use a local registry instead wherever possible.
- If the plugin is updated on Hub to an incompatible version, it will break integration tests for older versions of Docker.
- The plugin is installed with full privileges, so a compromise of this Hub account can lead to root access on any machine that runs the integration tests.
- It's a waste of bandwidth to pull the plugins from the internet every time a test which uses them runs.
I think it would be a lot better to bake the plugins into the Docker image and serve them from a local registry.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area/pluginsarea/testingkind/enhancementEnhancements are not bugs or new features but can improve usability or performance.Enhancements are not bugs or new features but can improve usability or performance.