docker_cli_plugins_test.go 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465
  1. package main
  2. import (
  3. "context"
  4. "fmt"
  5. "io/ioutil"
  6. "net/http"
  7. "os"
  8. "path"
  9. "path/filepath"
  10. "strings"
  11. "testing"
  12. "time"
  13. "github.com/docker/docker/api/types"
  14. "github.com/docker/docker/integration-cli/cli"
  15. "github.com/docker/docker/integration-cli/daemon"
  16. "github.com/docker/docker/internal/test/fixtures/plugin"
  17. "github.com/go-check/check"
  18. "gotest.tools/assert"
  19. )
  20. var (
  21. pluginProcessName = "sample-volume-plugin"
  22. pName = "tiborvass/sample-volume-plugin"
  23. npName = "tiborvass/test-docker-netplugin"
  24. pTag = "latest"
  25. pNameWithTag = pName + ":" + pTag
  26. npNameWithTag = npName + ":" + pTag
  27. )
  28. func (ps *DockerPluginSuite) TestPluginBasicOps(c *testing.T) {
  29. plugin := ps.getPluginRepoWithTag()
  30. _, _, err := dockerCmdWithError("plugin", "install", "--grant-all-permissions", plugin)
  31. assert.NilError(c, err)
  32. out, _, err := dockerCmdWithError("plugin", "ls")
  33. assert.NilError(c, err)
  34. assert.Assert(c, strings.Contains(out, plugin))
  35. assert.Assert(c, strings.Contains(out, "true"))
  36. id, _, err := dockerCmdWithError("plugin", "inspect", "-f", "{{.Id}}", plugin)
  37. id = strings.TrimSpace(id)
  38. assert.NilError(c, err)
  39. out, _, err = dockerCmdWithError("plugin", "remove", plugin)
  40. assert.ErrorContains(c, err, "")
  41. assert.Assert(c, strings.Contains(out, "is enabled"))
  42. _, _, err = dockerCmdWithError("plugin", "disable", plugin)
  43. assert.NilError(c, err)
  44. out, _, err = dockerCmdWithError("plugin", "remove", plugin)
  45. assert.NilError(c, err)
  46. assert.Assert(c, strings.Contains(out, plugin))
  47. _, err = os.Stat(filepath.Join(testEnv.DaemonInfo.DockerRootDir, "plugins", id))
  48. if !os.IsNotExist(err) {
  49. c.Fatal(err)
  50. }
  51. }
  52. func (ps *DockerPluginSuite) TestPluginForceRemove(c *testing.T) {
  53. pNameWithTag := ps.getPluginRepoWithTag()
  54. _, _, err := dockerCmdWithError("plugin", "install", "--grant-all-permissions", pNameWithTag)
  55. assert.NilError(c, err)
  56. out, _, _ := dockerCmdWithError("plugin", "remove", pNameWithTag)
  57. assert.Assert(c, strings.Contains(out, "is enabled"))
  58. out, _, err = dockerCmdWithError("plugin", "remove", "--force", pNameWithTag)
  59. assert.NilError(c, err)
  60. assert.Assert(c, strings.Contains(out, pNameWithTag))
  61. }
  62. func (s *DockerSuite) TestPluginActive(c *testing.T) {
  63. testRequires(c, DaemonIsLinux, IsAmd64, Network)
  64. _, _, err := dockerCmdWithError("plugin", "install", "--grant-all-permissions", pNameWithTag)
  65. assert.NilError(c, err)
  66. _, _, err = dockerCmdWithError("volume", "create", "-d", pNameWithTag, "--name", "testvol1")
  67. assert.NilError(c, err)
  68. out, _, _ := dockerCmdWithError("plugin", "disable", pNameWithTag)
  69. assert.Assert(c, strings.Contains(out, "in use"))
  70. _, _, err = dockerCmdWithError("volume", "rm", "testvol1")
  71. assert.NilError(c, err)
  72. _, _, err = dockerCmdWithError("plugin", "disable", pNameWithTag)
  73. assert.NilError(c, err)
  74. out, _, err = dockerCmdWithError("plugin", "remove", pNameWithTag)
  75. assert.NilError(c, err)
  76. assert.Assert(c, strings.Contains(out, pNameWithTag))
  77. }
  78. func (s *DockerSuite) TestPluginActiveNetwork(c *testing.T) {
  79. testRequires(c, DaemonIsLinux, IsAmd64, Network)
  80. _, _, err := dockerCmdWithError("plugin", "install", "--grant-all-permissions", npNameWithTag)
  81. assert.NilError(c, err)
  82. out, _, err := dockerCmdWithError("network", "create", "-d", npNameWithTag, "test")
  83. assert.NilError(c, err)
  84. nID := strings.TrimSpace(out)
  85. out, _, _ = dockerCmdWithError("plugin", "remove", npNameWithTag)
  86. assert.Assert(c, strings.Contains(out, "is in use"))
  87. _, _, err = dockerCmdWithError("network", "rm", nID)
  88. assert.NilError(c, err)
  89. out, _, _ = dockerCmdWithError("plugin", "remove", npNameWithTag)
  90. assert.Assert(c, strings.Contains(out, "is enabled"))
  91. _, _, err = dockerCmdWithError("plugin", "disable", npNameWithTag)
  92. assert.NilError(c, err)
  93. out, _, err = dockerCmdWithError("plugin", "remove", npNameWithTag)
  94. assert.NilError(c, err)
  95. assert.Assert(c, strings.Contains(out, npNameWithTag))
  96. }
  97. func (ps *DockerPluginSuite) TestPluginInstallDisable(c *testing.T) {
  98. pName := ps.getPluginRepoWithTag()
  99. out, _, err := dockerCmdWithError("plugin", "install", "--grant-all-permissions", "--disable", pName)
  100. assert.NilError(c, err)
  101. assert.Assert(c, strings.Contains(strings.TrimSpace(out), pName))
  102. out, _, err = dockerCmdWithError("plugin", "ls")
  103. assert.NilError(c, err)
  104. assert.Assert(c, strings.Contains(out, "false"))
  105. out, _, err = dockerCmdWithError("plugin", "enable", pName)
  106. assert.NilError(c, err)
  107. assert.Assert(c, strings.Contains(strings.TrimSpace(out), pName))
  108. out, _, err = dockerCmdWithError("plugin", "disable", pName)
  109. assert.NilError(c, err)
  110. assert.Assert(c, strings.Contains(strings.TrimSpace(out), pName))
  111. out, _, err = dockerCmdWithError("plugin", "remove", pName)
  112. assert.NilError(c, err)
  113. assert.Assert(c, strings.Contains(strings.TrimSpace(out), pName))
  114. }
  115. func (s *DockerSuite) TestPluginInstallDisableVolumeLs(c *testing.T) {
  116. testRequires(c, DaemonIsLinux, IsAmd64, Network)
  117. out, _, err := dockerCmdWithError("plugin", "install", "--grant-all-permissions", "--disable", pName)
  118. assert.NilError(c, err)
  119. assert.Assert(c, strings.Contains(strings.TrimSpace(out), pName))
  120. dockerCmd(c, "volume", "ls")
  121. }
  122. func (ps *DockerPluginSuite) TestPluginSet(c *testing.T) {
  123. client := testEnv.APIClient()
  124. name := "test"
  125. ctx, cancel := context.WithTimeout(context.Background(), 60*time.Second)
  126. defer cancel()
  127. initialValue := "0"
  128. mntSrc := "foo"
  129. devPath := "/dev/bar"
  130. // Create a new plugin with extra settings
  131. err := plugin.Create(ctx, client, name, func(cfg *plugin.Config) {
  132. cfg.Env = []types.PluginEnv{{Name: "DEBUG", Value: &initialValue, Settable: []string{"value"}}}
  133. cfg.Mounts = []types.PluginMount{
  134. {Name: "pmount1", Settable: []string{"source"}, Type: "none", Source: &mntSrc},
  135. {Name: "pmount2", Settable: []string{"source"}, Type: "none"}, // Mount without source is invalid.
  136. }
  137. cfg.Linux.Devices = []types.PluginDevice{
  138. {Name: "pdev1", Path: &devPath, Settable: []string{"path"}},
  139. {Name: "pdev2", Settable: []string{"path"}}, // Device without Path is invalid.
  140. }
  141. })
  142. assert.Assert(c, err == nil, check.Commentf("failed to create test plugin"))
  143. env, _ := dockerCmd(c, "plugin", "inspect", "-f", "{{.Settings.Env}}", name)
  144. assert.Equal(c, strings.TrimSpace(env), "[DEBUG=0]")
  145. dockerCmd(c, "plugin", "set", name, "DEBUG=1")
  146. env, _ = dockerCmd(c, "plugin", "inspect", "-f", "{{.Settings.Env}}", name)
  147. assert.Equal(c, strings.TrimSpace(env), "[DEBUG=1]")
  148. env, _ = dockerCmd(c, "plugin", "inspect", "-f", "{{with $mount := index .Settings.Mounts 0}}{{$mount.Source}}{{end}}", name)
  149. assert.Assert(c, strings.Contains(strings.TrimSpace(env), mntSrc))
  150. dockerCmd(c, "plugin", "set", name, "pmount1.source=bar")
  151. env, _ = dockerCmd(c, "plugin", "inspect", "-f", "{{with $mount := index .Settings.Mounts 0}}{{$mount.Source}}{{end}}", name)
  152. assert.Assert(c, strings.Contains(strings.TrimSpace(env), "bar"))
  153. out, _, err := dockerCmdWithError("plugin", "set", name, "pmount2.source=bar2")
  154. assert.ErrorContains(c, err, "")
  155. assert.Assert(c, strings.Contains(out, "Plugin config has no mount source"))
  156. out, _, err = dockerCmdWithError("plugin", "set", name, "pdev2.path=/dev/bar2")
  157. assert.ErrorContains(c, err, "")
  158. assert.Assert(c, strings.Contains(out, "Plugin config has no device path"))
  159. }
  160. func (ps *DockerPluginSuite) TestPluginInstallArgs(c *testing.T) {
  161. pName := path.Join(ps.registryHost(), "plugin", "testplugininstallwithargs")
  162. ctx, cancel := context.WithTimeout(context.Background(), 60*time.Second)
  163. defer cancel()
  164. plugin.CreateInRegistry(ctx, pName, nil, func(cfg *plugin.Config) {
  165. cfg.Env = []types.PluginEnv{{Name: "DEBUG", Settable: []string{"value"}}}
  166. })
  167. out, _ := dockerCmd(c, "plugin", "install", "--grant-all-permissions", "--disable", pName, "DEBUG=1")
  168. assert.Assert(c, strings.Contains(strings.TrimSpace(out), pName))
  169. env, _ := dockerCmd(c, "plugin", "inspect", "-f", "{{.Settings.Env}}", pName)
  170. assert.Equal(c, strings.TrimSpace(env), "[DEBUG=1]")
  171. }
  172. func (ps *DockerPluginSuite) TestPluginInstallImage(c *testing.T) {
  173. testRequires(c, IsAmd64)
  174. repoName := fmt.Sprintf("%v/dockercli/busybox", privateRegistryURL)
  175. // tag the image to upload it to the private registry
  176. dockerCmd(c, "tag", "busybox", repoName)
  177. // push the image to the registry
  178. dockerCmd(c, "push", repoName)
  179. out, _, err := dockerCmdWithError("plugin", "install", repoName)
  180. assert.ErrorContains(c, err, "")
  181. assert.Assert(c, strings.Contains(out, `Encountered remote "application/vnd.docker.container.image.v1+json"(image) when fetching`))
  182. }
  183. func (ps *DockerPluginSuite) TestPluginEnableDisableNegative(c *testing.T) {
  184. pName := ps.getPluginRepoWithTag()
  185. out, _, err := dockerCmdWithError("plugin", "install", "--grant-all-permissions", pName)
  186. assert.NilError(c, err)
  187. assert.Assert(c, strings.Contains(strings.TrimSpace(out), pName))
  188. out, _, err = dockerCmdWithError("plugin", "enable", pName)
  189. assert.ErrorContains(c, err, "")
  190. assert.Assert(c, strings.Contains(strings.TrimSpace(out), "already enabled"))
  191. _, _, err = dockerCmdWithError("plugin", "disable", pName)
  192. assert.NilError(c, err)
  193. out, _, err = dockerCmdWithError("plugin", "disable", pName)
  194. assert.ErrorContains(c, err, "")
  195. assert.Assert(c, strings.Contains(strings.TrimSpace(out), "already disabled"))
  196. _, _, err = dockerCmdWithError("plugin", "remove", pName)
  197. assert.NilError(c, err)
  198. }
  199. func (ps *DockerPluginSuite) TestPluginCreate(c *testing.T) {
  200. name := "foo/bar-driver"
  201. temp, err := ioutil.TempDir("", "foo")
  202. assert.NilError(c, err)
  203. defer os.RemoveAll(temp)
  204. data := `{"description": "foo plugin"}`
  205. err = ioutil.WriteFile(filepath.Join(temp, "config.json"), []byte(data), 0644)
  206. assert.NilError(c, err)
  207. err = os.MkdirAll(filepath.Join(temp, "rootfs"), 0700)
  208. assert.NilError(c, err)
  209. out, _, err := dockerCmdWithError("plugin", "create", name, temp)
  210. assert.NilError(c, err)
  211. assert.Assert(c, strings.Contains(out, name))
  212. out, _, err = dockerCmdWithError("plugin", "ls")
  213. assert.NilError(c, err)
  214. assert.Assert(c, strings.Contains(out, name))
  215. out, _, err = dockerCmdWithError("plugin", "create", name, temp)
  216. assert.ErrorContains(c, err, "")
  217. assert.Assert(c, strings.Contains(out, "already exist"))
  218. out, _, err = dockerCmdWithError("plugin", "ls")
  219. assert.NilError(c, err)
  220. assert.Assert(c, strings.Contains(out, name))
  221. // The output will consists of one HEADER line and one line of foo/bar-driver
  222. assert.Equal(c, len(strings.Split(strings.TrimSpace(out), "\n")), 2)
  223. }
  224. func (ps *DockerPluginSuite) TestPluginInspect(c *testing.T) {
  225. pNameWithTag := ps.getPluginRepoWithTag()
  226. _, _, err := dockerCmdWithError("plugin", "install", "--grant-all-permissions", pNameWithTag)
  227. assert.NilError(c, err)
  228. out, _, err := dockerCmdWithError("plugin", "ls")
  229. assert.NilError(c, err)
  230. assert.Assert(c, strings.Contains(out, pNameWithTag))
  231. assert.Assert(c, strings.Contains(out, "true"))
  232. // Find the ID first
  233. out, _, err = dockerCmdWithError("plugin", "inspect", "-f", "{{.Id}}", pNameWithTag)
  234. assert.NilError(c, err)
  235. id := strings.TrimSpace(out)
  236. assert.Assert(c, id != "")
  237. // Long form
  238. out, _, err = dockerCmdWithError("plugin", "inspect", "-f", "{{.Id}}", id)
  239. assert.NilError(c, err)
  240. assert.Equal(c, strings.TrimSpace(out), id)
  241. // Short form
  242. out, _, err = dockerCmdWithError("plugin", "inspect", "-f", "{{.Id}}", id[:5])
  243. assert.NilError(c, err)
  244. assert.Equal(c, strings.TrimSpace(out), id)
  245. // Name with tag form
  246. out, _, err = dockerCmdWithError("plugin", "inspect", "-f", "{{.Id}}", pNameWithTag)
  247. assert.NilError(c, err)
  248. assert.Equal(c, strings.TrimSpace(out), id)
  249. // Name without tag form
  250. out, _, err = dockerCmdWithError("plugin", "inspect", "-f", "{{.Id}}", ps.getPluginRepo())
  251. assert.NilError(c, err)
  252. assert.Equal(c, strings.TrimSpace(out), id)
  253. _, _, err = dockerCmdWithError("plugin", "disable", pNameWithTag)
  254. assert.NilError(c, err)
  255. out, _, err = dockerCmdWithError("plugin", "remove", pNameWithTag)
  256. assert.NilError(c, err)
  257. assert.Assert(c, strings.Contains(out, pNameWithTag))
  258. // After remove nothing should be found
  259. _, _, err = dockerCmdWithError("plugin", "inspect", "-f", "{{.Id}}", id[:5])
  260. assert.ErrorContains(c, err, "")
  261. }
  262. // Test case for https://github.com/docker/docker/pull/29186#discussion_r91277345
  263. func (s *DockerSuite) TestPluginInspectOnWindows(c *testing.T) {
  264. // This test should work on Windows only
  265. testRequires(c, DaemonIsWindows)
  266. out, _, err := dockerCmdWithError("plugin", "inspect", "foobar")
  267. assert.ErrorContains(c, err, "")
  268. assert.Assert(c, strings.Contains(out, "plugins are not supported on this platform"))
  269. assert.ErrorContains(c, err, "plugins are not supported on this platform")
  270. }
  271. func (ps *DockerPluginSuite) TestPluginIDPrefix(c *testing.T) {
  272. name := "test"
  273. client := testEnv.APIClient()
  274. ctx, cancel := context.WithTimeout(context.Background(), 60*time.Second)
  275. initialValue := "0"
  276. err := plugin.Create(ctx, client, name, func(cfg *plugin.Config) {
  277. cfg.Env = []types.PluginEnv{{Name: "DEBUG", Value: &initialValue, Settable: []string{"value"}}}
  278. })
  279. cancel()
  280. assert.Assert(c, err == nil, check.Commentf("failed to create test plugin"))
  281. // Find ID first
  282. id, _, err := dockerCmdWithError("plugin", "inspect", "-f", "{{.Id}}", name)
  283. id = strings.TrimSpace(id)
  284. assert.NilError(c, err)
  285. // List current state
  286. out, _, err := dockerCmdWithError("plugin", "ls")
  287. assert.NilError(c, err)
  288. assert.Assert(c, strings.Contains(out, name))
  289. assert.Assert(c, strings.Contains(out, "false"))
  290. env, _ := dockerCmd(c, "plugin", "inspect", "-f", "{{.Settings.Env}}", id[:5])
  291. assert.Equal(c, strings.TrimSpace(env), "[DEBUG=0]")
  292. dockerCmd(c, "plugin", "set", id[:5], "DEBUG=1")
  293. env, _ = dockerCmd(c, "plugin", "inspect", "-f", "{{.Settings.Env}}", id[:5])
  294. assert.Equal(c, strings.TrimSpace(env), "[DEBUG=1]")
  295. // Enable
  296. _, _, err = dockerCmdWithError("plugin", "enable", id[:5])
  297. assert.NilError(c, err)
  298. out, _, err = dockerCmdWithError("plugin", "ls")
  299. assert.NilError(c, err)
  300. assert.Assert(c, strings.Contains(out, name))
  301. assert.Assert(c, strings.Contains(out, "true"))
  302. // Disable
  303. _, _, err = dockerCmdWithError("plugin", "disable", id[:5])
  304. assert.NilError(c, err)
  305. out, _, err = dockerCmdWithError("plugin", "ls")
  306. assert.NilError(c, err)
  307. assert.Assert(c, strings.Contains(out, name))
  308. assert.Assert(c, strings.Contains(out, "false"))
  309. // Remove
  310. _, _, err = dockerCmdWithError("plugin", "remove", id[:5])
  311. assert.NilError(c, err)
  312. // List returns none
  313. out, _, err = dockerCmdWithError("plugin", "ls")
  314. assert.NilError(c, err)
  315. assert.Assert(c, !strings.Contains(out, name))
  316. }
  317. func (ps *DockerPluginSuite) TestPluginListDefaultFormat(c *testing.T) {
  318. config, err := ioutil.TempDir("", "config-file-")
  319. assert.NilError(c, err)
  320. defer os.RemoveAll(config)
  321. err = ioutil.WriteFile(filepath.Join(config, "config.json"), []byte(`{"pluginsFormat": "raw"}`), 0644)
  322. assert.NilError(c, err)
  323. name := "test:latest"
  324. client := testEnv.APIClient()
  325. ctx, cancel := context.WithTimeout(context.Background(), 60*time.Second)
  326. defer cancel()
  327. err = plugin.Create(ctx, client, name, func(cfg *plugin.Config) {
  328. cfg.Description = "test plugin"
  329. })
  330. assert.Assert(c, err == nil, check.Commentf("failed to create test plugin"))
  331. out, _ := dockerCmd(c, "plugin", "inspect", "--format", "{{.ID}}", name)
  332. id := strings.TrimSpace(out)
  333. // We expect the format to be in `raw + --no-trunc`
  334. expectedOutput := fmt.Sprintf(`plugin_id: %s
  335. name: %s
  336. description: test plugin
  337. enabled: false`, id, name)
  338. out, _ = dockerCmd(c, "--config", config, "plugin", "ls", "--no-trunc")
  339. assert.Assert(c, strings.Contains(strings.TrimSpace(out), expectedOutput))
  340. }
  341. func (s *DockerSuite) TestPluginUpgrade(c *testing.T) {
  342. testRequires(c, DaemonIsLinux, Network, testEnv.IsLocalDaemon, IsAmd64, NotUserNamespace)
  343. plugin := "cpuguy83/docker-volume-driver-plugin-local:latest"
  344. pluginV2 := "cpuguy83/docker-volume-driver-plugin-local:v2"
  345. dockerCmd(c, "plugin", "install", "--grant-all-permissions", plugin)
  346. dockerCmd(c, "volume", "create", "--driver", plugin, "bananas")
  347. dockerCmd(c, "run", "--rm", "-v", "bananas:/apple", "busybox", "sh", "-c", "touch /apple/core")
  348. out, _, err := dockerCmdWithError("plugin", "upgrade", "--grant-all-permissions", plugin, pluginV2)
  349. assert.ErrorContains(c, err, "", out)
  350. assert.Assert(c, strings.Contains(out, "disabled before upgrading"))
  351. out, _ = dockerCmd(c, "plugin", "inspect", "--format={{.ID}}", plugin)
  352. id := strings.TrimSpace(out)
  353. // make sure "v2" does not exists
  354. _, err = os.Stat(filepath.Join(testEnv.DaemonInfo.DockerRootDir, "plugins", id, "rootfs", "v2"))
  355. assert.Assert(c, os.IsNotExist(err), fmt.Sprintf("%s", out))
  356. dockerCmd(c, "plugin", "disable", "-f", plugin)
  357. dockerCmd(c, "plugin", "upgrade", "--grant-all-permissions", "--skip-remote-check", plugin, pluginV2)
  358. // make sure "v2" file exists
  359. _, err = os.Stat(filepath.Join(testEnv.DaemonInfo.DockerRootDir, "plugins", id, "rootfs", "v2"))
  360. assert.NilError(c, err)
  361. dockerCmd(c, "plugin", "enable", plugin)
  362. dockerCmd(c, "volume", "inspect", "bananas")
  363. dockerCmd(c, "run", "--rm", "-v", "bananas:/apple", "busybox", "sh", "-c", "ls -lh /apple/core")
  364. }
  365. func (s *DockerSuite) TestPluginMetricsCollector(c *testing.T) {
  366. testRequires(c, DaemonIsLinux, Network, testEnv.IsLocalDaemon, IsAmd64)
  367. d := daemon.New(c, dockerBinary, dockerdBinary)
  368. d.Start(c)
  369. defer d.Stop(c)
  370. name := "cpuguy83/docker-metrics-plugin-test:latest"
  371. r := cli.Docker(cli.Args("plugin", "install", "--grant-all-permissions", name), cli.Daemon(d))
  372. assert.Assert(c, r.Error == nil, check.Commentf(r.Combined()))
  373. // plugin lisens on localhost:19393 and proxies the metrics
  374. resp, err := http.Get("http://localhost:19393/metrics")
  375. assert.NilError(c, err)
  376. defer resp.Body.Close()
  377. b, err := ioutil.ReadAll(resp.Body)
  378. assert.NilError(c, err)
  379. // check that a known metric is there... don't expect this metric to change over time.. probably safe
  380. assert.Assert(c, strings.Contains(string(b), "container_actions"))
  381. }