2016-10-06 10:09:54 -04:00
|
|
|
// +build linux
|
2016-03-18 14:50:19 -04:00
|
|
|
|
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
2016-07-08 13:37:52 -04:00
|
|
|
"strings"
|
|
|
|
|
2016-12-30 12:23:00 -05:00
|
|
|
"github.com/docker/docker/integration-cli/checker"
|
2016-11-22 14:21:34 -05:00
|
|
|
"github.com/docker/docker/pkg/mount"
|
2016-07-08 13:37:52 -04:00
|
|
|
"github.com/go-check/check"
|
2017-05-23 10:22:32 -04:00
|
|
|
"golang.org/x/sys/unix"
|
2018-06-11 09:32:11 -04:00
|
|
|
"gotest.tools/icmd"
|
2016-03-18 14:50:19 -04:00
|
|
|
)
|
|
|
|
|
2016-06-17 11:21:03 -04:00
|
|
|
// TestDaemonRestartWithPluginEnabled tests state restore for an enabled plugin
|
|
|
|
func (s *DockerDaemonSuite) TestDaemonRestartWithPluginEnabled(c *check.C) {
|
2016-12-12 15:46:36 -05:00
|
|
|
testRequires(c, IsAmd64, Network)
|
2016-10-06 10:09:54 -04:00
|
|
|
|
2016-12-09 17:20:14 -05:00
|
|
|
s.d.Start(c)
|
2016-03-04 17:41:53 -05:00
|
|
|
|
2016-11-10 16:07:53 -05:00
|
|
|
if out, err := s.d.Cmd("plugin", "install", "--grant-all-permissions", pName); err != nil {
|
2016-06-17 11:21:03 -04:00
|
|
|
c.Fatalf("Could not install plugin: %v %s", err, out)
|
2016-03-04 17:41:53 -05:00
|
|
|
}
|
|
|
|
|
2016-06-27 23:32:03 -04:00
|
|
|
defer func() {
|
2016-11-10 16:07:53 -05:00
|
|
|
if out, err := s.d.Cmd("plugin", "disable", pName); err != nil {
|
2016-06-27 23:32:03 -04:00
|
|
|
c.Fatalf("Could not disable plugin: %v %s", err, out)
|
|
|
|
}
|
2016-11-10 16:07:53 -05:00
|
|
|
if out, err := s.d.Cmd("plugin", "remove", pName); err != nil {
|
2016-06-27 23:32:03 -04:00
|
|
|
c.Fatalf("Could not remove plugin: %v %s", err, out)
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
|
2016-12-09 17:20:14 -05:00
|
|
|
s.d.Restart(c)
|
2016-03-18 14:50:19 -04:00
|
|
|
|
2016-06-17 11:21:03 -04:00
|
|
|
out, err := s.d.Cmd("plugin", "ls")
|
2016-03-18 14:50:19 -04:00
|
|
|
if err != nil {
|
2016-06-17 11:21:03 -04:00
|
|
|
c.Fatalf("Could not list plugins: %v %s", err, out)
|
2016-03-18 14:50:19 -04:00
|
|
|
}
|
2016-11-10 16:07:53 -05:00
|
|
|
c.Assert(out, checker.Contains, pName)
|
2016-06-17 11:21:03 -04:00
|
|
|
c.Assert(out, checker.Contains, "true")
|
|
|
|
}
|
2016-03-18 14:50:19 -04:00
|
|
|
|
2016-08-11 18:59:35 -04:00
|
|
|
// TestDaemonRestartWithPluginDisabled tests state restore for a disabled plugin
|
2016-06-17 11:21:03 -04:00
|
|
|
func (s *DockerDaemonSuite) TestDaemonRestartWithPluginDisabled(c *check.C) {
|
2016-12-12 15:46:36 -05:00
|
|
|
testRequires(c, IsAmd64, Network)
|
2016-10-06 10:09:54 -04:00
|
|
|
|
2016-12-09 17:20:14 -05:00
|
|
|
s.d.Start(c)
|
2016-03-18 14:50:19 -04:00
|
|
|
|
2016-11-10 16:07:53 -05:00
|
|
|
if out, err := s.d.Cmd("plugin", "install", "--grant-all-permissions", pName, "--disable"); err != nil {
|
2016-06-17 11:21:03 -04:00
|
|
|
c.Fatalf("Could not install plugin: %v %s", err, out)
|
2016-03-18 14:50:19 -04:00
|
|
|
}
|
|
|
|
|
2016-06-27 23:32:03 -04:00
|
|
|
defer func() {
|
2016-11-10 16:07:53 -05:00
|
|
|
if out, err := s.d.Cmd("plugin", "remove", pName); err != nil {
|
2016-06-27 23:32:03 -04:00
|
|
|
c.Fatalf("Could not remove plugin: %v %s", err, out)
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
|
2016-12-09 17:20:14 -05:00
|
|
|
s.d.Restart(c)
|
2016-03-18 14:50:19 -04:00
|
|
|
|
2016-06-17 11:21:03 -04:00
|
|
|
out, err := s.d.Cmd("plugin", "ls")
|
|
|
|
if err != nil {
|
|
|
|
c.Fatalf("Could not list plugins: %v %s", err, out)
|
2016-06-14 14:06:11 -04:00
|
|
|
}
|
2016-11-10 16:07:53 -05:00
|
|
|
c.Assert(out, checker.Contains, pName)
|
2016-06-17 11:21:03 -04:00
|
|
|
c.Assert(out, checker.Contains, "false")
|
2016-03-18 14:50:19 -04:00
|
|
|
}
|
2016-07-01 14:36:11 -04:00
|
|
|
|
2016-07-22 11:53:26 -04:00
|
|
|
// TestDaemonKillLiveRestoreWithPlugins SIGKILLs daemon started with --live-restore.
|
|
|
|
// Plugins should continue to run.
|
|
|
|
func (s *DockerDaemonSuite) TestDaemonKillLiveRestoreWithPlugins(c *check.C) {
|
2016-12-12 15:46:36 -05:00
|
|
|
testRequires(c, IsAmd64, Network)
|
2016-10-06 10:09:54 -04:00
|
|
|
|
2016-12-09 17:20:14 -05:00
|
|
|
s.d.Start(c, "--live-restore")
|
2016-11-10 16:07:53 -05:00
|
|
|
if out, err := s.d.Cmd("plugin", "install", "--grant-all-permissions", pName); err != nil {
|
2016-07-01 14:36:11 -04:00
|
|
|
c.Fatalf("Could not install plugin: %v %s", err, out)
|
|
|
|
}
|
|
|
|
defer func() {
|
2016-12-09 17:20:14 -05:00
|
|
|
s.d.Restart(c, "--live-restore")
|
2016-11-10 16:07:53 -05:00
|
|
|
if out, err := s.d.Cmd("plugin", "disable", pName); err != nil {
|
2016-07-01 14:36:11 -04:00
|
|
|
c.Fatalf("Could not disable plugin: %v %s", err, out)
|
|
|
|
}
|
2016-11-10 16:07:53 -05:00
|
|
|
if out, err := s.d.Cmd("plugin", "remove", pName); err != nil {
|
2016-07-01 14:36:11 -04:00
|
|
|
c.Fatalf("Could not remove plugin: %v %s", err, out)
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
|
|
|
|
if err := s.d.Kill(); err != nil {
|
|
|
|
c.Fatalf("Could not kill daemon: %v", err)
|
2016-07-22 11:53:26 -04:00
|
|
|
}
|
|
|
|
|
2017-01-05 06:38:34 -05:00
|
|
|
icmd.RunCommand("pgrep", "-f", pluginProcessName).Assert(c, icmd.Success)
|
2016-07-22 11:53:26 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
// TestDaemonShutdownLiveRestoreWithPlugins SIGTERMs daemon started with --live-restore.
|
|
|
|
// Plugins should continue to run.
|
|
|
|
func (s *DockerDaemonSuite) TestDaemonShutdownLiveRestoreWithPlugins(c *check.C) {
|
2016-12-12 15:46:36 -05:00
|
|
|
testRequires(c, IsAmd64, Network)
|
2016-10-06 10:09:54 -04:00
|
|
|
|
2016-12-09 17:20:14 -05:00
|
|
|
s.d.Start(c, "--live-restore")
|
2016-11-10 16:07:53 -05:00
|
|
|
if out, err := s.d.Cmd("plugin", "install", "--grant-all-permissions", pName); err != nil {
|
2016-07-22 11:53:26 -04:00
|
|
|
c.Fatalf("Could not install plugin: %v %s", err, out)
|
|
|
|
}
|
|
|
|
defer func() {
|
2016-12-09 17:20:14 -05:00
|
|
|
s.d.Restart(c, "--live-restore")
|
2016-11-10 16:07:53 -05:00
|
|
|
if out, err := s.d.Cmd("plugin", "disable", pName); err != nil {
|
2016-07-22 11:53:26 -04:00
|
|
|
c.Fatalf("Could not disable plugin: %v %s", err, out)
|
|
|
|
}
|
2016-11-10 16:07:53 -05:00
|
|
|
if out, err := s.d.Cmd("plugin", "remove", pName); err != nil {
|
2016-07-22 11:53:26 -04:00
|
|
|
c.Fatalf("Could not remove plugin: %v %s", err, out)
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
|
2016-12-09 04:17:53 -05:00
|
|
|
if err := s.d.Interrupt(); err != nil {
|
2016-07-22 11:53:26 -04:00
|
|
|
c.Fatalf("Could not kill daemon: %v", err)
|
2016-07-01 14:36:11 -04:00
|
|
|
}
|
|
|
|
|
2017-01-05 06:38:34 -05:00
|
|
|
icmd.RunCommand("pgrep", "-f", pluginProcessName).Assert(c, icmd.Success)
|
2016-07-01 14:36:11 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
// TestDaemonShutdownWithPlugins shuts down running plugins.
|
|
|
|
func (s *DockerDaemonSuite) TestDaemonShutdownWithPlugins(c *check.C) {
|
2016-12-09 12:53:10 -05:00
|
|
|
testRequires(c, IsAmd64, Network, SameHostDaemon)
|
2016-10-06 10:09:54 -04:00
|
|
|
|
2016-12-09 17:20:14 -05:00
|
|
|
s.d.Start(c)
|
2016-11-10 16:07:53 -05:00
|
|
|
if out, err := s.d.Cmd("plugin", "install", "--grant-all-permissions", pName); err != nil {
|
2016-07-01 14:36:11 -04:00
|
|
|
c.Fatalf("Could not install plugin: %v %s", err, out)
|
|
|
|
}
|
|
|
|
|
|
|
|
defer func() {
|
2016-12-09 17:20:14 -05:00
|
|
|
s.d.Restart(c)
|
2016-11-10 16:07:53 -05:00
|
|
|
if out, err := s.d.Cmd("plugin", "disable", pName); err != nil {
|
2016-07-01 14:36:11 -04:00
|
|
|
c.Fatalf("Could not disable plugin: %v %s", err, out)
|
|
|
|
}
|
2016-11-10 16:07:53 -05:00
|
|
|
if out, err := s.d.Cmd("plugin", "remove", pName); err != nil {
|
2016-07-01 14:36:11 -04:00
|
|
|
c.Fatalf("Could not remove plugin: %v %s", err, out)
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
|
2016-12-09 04:17:53 -05:00
|
|
|
if err := s.d.Interrupt(); err != nil {
|
2016-07-01 14:36:11 -04:00
|
|
|
c.Fatalf("Could not kill daemon: %v", err)
|
|
|
|
}
|
|
|
|
|
2016-07-11 11:55:39 -04:00
|
|
|
for {
|
2017-05-23 10:22:32 -04:00
|
|
|
if err := unix.Kill(s.d.Pid(), 0); err == unix.ESRCH {
|
2016-07-11 11:55:39 -04:00
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
2016-07-01 14:36:11 -04:00
|
|
|
|
2017-01-05 06:38:34 -05:00
|
|
|
icmd.RunCommand("pgrep", "-f", pluginProcessName).Assert(c, icmd.Expected{
|
|
|
|
ExitCode: 1,
|
2017-01-05 13:08:24 -05:00
|
|
|
Error: "exit status 1",
|
2017-01-05 06:38:34 -05:00
|
|
|
})
|
2016-12-09 12:53:10 -05:00
|
|
|
|
2017-03-22 17:37:16 -04:00
|
|
|
s.d.Start(c)
|
|
|
|
icmd.RunCommand("pgrep", "-f", pluginProcessName).Assert(c, icmd.Success)
|
|
|
|
}
|
|
|
|
|
|
|
|
// TestDaemonKillWithPlugins leaves plugins running.
|
|
|
|
func (s *DockerDaemonSuite) TestDaemonKillWithPlugins(c *check.C) {
|
|
|
|
testRequires(c, IsAmd64, Network, SameHostDaemon)
|
|
|
|
|
|
|
|
s.d.Start(c)
|
|
|
|
if out, err := s.d.Cmd("plugin", "install", "--grant-all-permissions", pName); err != nil {
|
|
|
|
c.Fatalf("Could not install plugin: %v %s", err, out)
|
|
|
|
}
|
|
|
|
|
|
|
|
defer func() {
|
|
|
|
s.d.Restart(c)
|
|
|
|
if out, err := s.d.Cmd("plugin", "disable", pName); err != nil {
|
|
|
|
c.Fatalf("Could not disable plugin: %v %s", err, out)
|
|
|
|
}
|
|
|
|
if out, err := s.d.Cmd("plugin", "remove", pName); err != nil {
|
|
|
|
c.Fatalf("Could not remove plugin: %v %s", err, out)
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
|
|
|
|
if err := s.d.Kill(); err != nil {
|
|
|
|
c.Fatalf("Could not kill daemon: %v", err)
|
|
|
|
}
|
|
|
|
|
|
|
|
// assert that plugins are running.
|
2017-01-05 06:38:34 -05:00
|
|
|
icmd.RunCommand("pgrep", "-f", pluginProcessName).Assert(c, icmd.Success)
|
2016-07-01 14:36:11 -04:00
|
|
|
}
|
2016-07-08 13:37:52 -04:00
|
|
|
|
|
|
|
// TestVolumePlugin tests volume creation using a plugin.
|
|
|
|
func (s *DockerDaemonSuite) TestVolumePlugin(c *check.C) {
|
2016-12-12 15:46:36 -05:00
|
|
|
testRequires(c, IsAmd64, Network)
|
2016-10-06 10:09:54 -04:00
|
|
|
|
2016-07-08 13:37:52 -04:00
|
|
|
volName := "plugin-volume"
|
|
|
|
destDir := "/tmp/data/"
|
|
|
|
destFile := "foo"
|
|
|
|
|
2016-12-09 17:20:14 -05:00
|
|
|
s.d.Start(c)
|
2016-11-10 16:07:53 -05:00
|
|
|
out, err := s.d.Cmd("plugin", "install", pName, "--grant-all-permissions")
|
2016-07-08 13:37:52 -04:00
|
|
|
if err != nil {
|
|
|
|
c.Fatalf("Could not install plugin: %v %s", err, out)
|
|
|
|
}
|
|
|
|
defer func() {
|
2016-11-10 16:07:53 -05:00
|
|
|
if out, err := s.d.Cmd("plugin", "disable", pName); err != nil {
|
2016-07-08 13:37:52 -04:00
|
|
|
c.Fatalf("Could not disable plugin: %v %s", err, out)
|
|
|
|
}
|
2016-11-22 14:21:34 -05:00
|
|
|
|
2016-11-10 16:07:53 -05:00
|
|
|
if out, err := s.d.Cmd("plugin", "remove", pName); err != nil {
|
2016-07-08 13:37:52 -04:00
|
|
|
c.Fatalf("Could not remove plugin: %v %s", err, out)
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
|
2016-11-10 16:07:53 -05:00
|
|
|
out, err = s.d.Cmd("volume", "create", "-d", pName, volName)
|
2016-07-08 13:37:52 -04:00
|
|
|
if err != nil {
|
|
|
|
c.Fatalf("Could not create volume: %v %s", err, out)
|
|
|
|
}
|
|
|
|
defer func() {
|
|
|
|
if out, err := s.d.Cmd("volume", "remove", volName); err != nil {
|
|
|
|
c.Fatalf("Could not remove volume: %v %s", err, out)
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
|
2016-08-16 18:53:43 -04:00
|
|
|
out, err = s.d.Cmd("volume", "ls")
|
|
|
|
if err != nil {
|
|
|
|
c.Fatalf("Could not list volume: %v %s", err, out)
|
|
|
|
}
|
|
|
|
c.Assert(out, checker.Contains, volName)
|
2016-11-10 16:07:53 -05:00
|
|
|
c.Assert(out, checker.Contains, pName)
|
2016-08-16 18:53:43 -04:00
|
|
|
|
2016-07-08 13:37:52 -04:00
|
|
|
out, err = s.d.Cmd("run", "--rm", "-v", volName+":"+destDir, "busybox", "touch", destDir+destFile)
|
2018-08-14 03:45:39 -04:00
|
|
|
c.Assert(err, checker.IsNil, check.Commentf("%s", out))
|
2016-07-08 13:37:52 -04:00
|
|
|
|
2018-02-20 16:57:20 -05:00
|
|
|
out, err = s.d.Cmd("run", "--rm", "-v", volName+":"+destDir, "busybox", "ls", destDir+destFile)
|
2018-08-14 03:45:39 -04:00
|
|
|
c.Assert(err, checker.IsNil, check.Commentf("%s", out))
|
2016-11-22 14:21:34 -05:00
|
|
|
}
|
|
|
|
|
2016-12-01 17:17:07 -05:00
|
|
|
func (s *DockerDaemonSuite) TestPluginVolumeRemoveOnRestart(c *check.C) {
|
|
|
|
testRequires(c, DaemonIsLinux, Network, IsAmd64)
|
|
|
|
|
|
|
|
s.d.Start(c, "--live-restore=true")
|
|
|
|
|
|
|
|
out, err := s.d.Cmd("plugin", "install", "--grant-all-permissions", pName)
|
2018-08-14 03:45:39 -04:00
|
|
|
c.Assert(err, checker.IsNil, check.Commentf("%s", out))
|
2016-12-01 17:17:07 -05:00
|
|
|
c.Assert(strings.TrimSpace(out), checker.Contains, pName)
|
|
|
|
|
|
|
|
out, err = s.d.Cmd("volume", "create", "--driver", pName, "test")
|
2018-08-14 03:45:39 -04:00
|
|
|
c.Assert(err, checker.IsNil, check.Commentf("%s", out))
|
2016-12-01 17:17:07 -05:00
|
|
|
|
|
|
|
s.d.Restart(c, "--live-restore=true")
|
|
|
|
|
|
|
|
out, err = s.d.Cmd("plugin", "disable", pName)
|
2018-08-14 03:45:39 -04:00
|
|
|
c.Assert(err, checker.NotNil, check.Commentf("%s", out))
|
2016-12-01 17:17:07 -05:00
|
|
|
c.Assert(out, checker.Contains, "in use")
|
2016-12-20 11:26:58 -05:00
|
|
|
|
|
|
|
out, err = s.d.Cmd("volume", "rm", "test")
|
2018-08-14 03:45:39 -04:00
|
|
|
c.Assert(err, checker.IsNil, check.Commentf("%s", out))
|
2016-12-20 11:26:58 -05:00
|
|
|
|
|
|
|
out, err = s.d.Cmd("plugin", "disable", pName)
|
2018-08-14 03:45:39 -04:00
|
|
|
c.Assert(err, checker.IsNil, check.Commentf("%s", out))
|
2016-12-20 11:26:58 -05:00
|
|
|
|
|
|
|
out, err = s.d.Cmd("plugin", "rm", pName)
|
2018-08-14 03:45:39 -04:00
|
|
|
c.Assert(err, checker.IsNil, check.Commentf("%s", out))
|
2016-12-01 17:17:07 -05:00
|
|
|
}
|
|
|
|
|
2016-11-22 14:21:34 -05:00
|
|
|
func existsMountpointWithPrefix(mountpointPrefix string) (bool, error) {
|
2018-01-19 14:56:32 -05:00
|
|
|
mounts, err := mount.GetMounts(nil)
|
2016-11-22 14:21:34 -05:00
|
|
|
if err != nil {
|
|
|
|
return false, err
|
|
|
|
}
|
|
|
|
for _, mnt := range mounts {
|
|
|
|
if strings.HasPrefix(mnt.Mountpoint, mountpointPrefix) {
|
|
|
|
return true, nil
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return false, nil
|
2016-07-08 13:37:52 -04:00
|
|
|
}
|
2016-11-23 07:58:15 -05:00
|
|
|
|
|
|
|
func (s *DockerDaemonSuite) TestPluginListFilterEnabled(c *check.C) {
|
2017-02-28 16:50:39 -05:00
|
|
|
testRequires(c, IsAmd64, Network)
|
2016-11-23 07:58:15 -05:00
|
|
|
|
|
|
|
s.d.Start(c)
|
|
|
|
|
|
|
|
out, err := s.d.Cmd("plugin", "install", "--grant-all-permissions", pNameWithTag, "--disable")
|
2018-08-14 03:45:39 -04:00
|
|
|
c.Assert(err, check.IsNil, check.Commentf("%s", out))
|
2016-11-23 07:58:15 -05:00
|
|
|
|
|
|
|
defer func() {
|
|
|
|
if out, err := s.d.Cmd("plugin", "remove", pNameWithTag); err != nil {
|
|
|
|
c.Fatalf("Could not remove plugin: %v %s", err, out)
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
|
|
|
|
out, err = s.d.Cmd("plugin", "ls", "--filter", "enabled=true")
|
2018-08-14 03:51:22 -04:00
|
|
|
c.Assert(err, checker.IsNil, check.Commentf("%s", out))
|
2016-11-23 07:58:15 -05:00
|
|
|
c.Assert(out, checker.Not(checker.Contains), pName)
|
|
|
|
|
|
|
|
out, err = s.d.Cmd("plugin", "ls", "--filter", "enabled=false")
|
2018-08-14 03:51:22 -04:00
|
|
|
c.Assert(err, checker.IsNil, check.Commentf("%s", out))
|
2016-11-23 07:58:15 -05:00
|
|
|
c.Assert(out, checker.Contains, pName)
|
|
|
|
c.Assert(out, checker.Contains, "false")
|
|
|
|
|
|
|
|
out, err = s.d.Cmd("plugin", "ls")
|
2018-08-14 03:51:22 -04:00
|
|
|
c.Assert(err, checker.IsNil, check.Commentf("%s", out))
|
2016-11-23 07:58:15 -05:00
|
|
|
c.Assert(out, checker.Contains, pName)
|
|
|
|
}
|
2016-11-23 08:27:09 -05:00
|
|
|
|
|
|
|
func (s *DockerDaemonSuite) TestPluginListFilterCapability(c *check.C) {
|
2017-02-28 16:50:39 -05:00
|
|
|
testRequires(c, IsAmd64, Network)
|
2016-11-23 08:27:09 -05:00
|
|
|
|
|
|
|
s.d.Start(c)
|
|
|
|
|
|
|
|
out, err := s.d.Cmd("plugin", "install", "--grant-all-permissions", pNameWithTag, "--disable")
|
2018-08-14 03:45:39 -04:00
|
|
|
c.Assert(err, check.IsNil, check.Commentf("%s", out))
|
2016-11-23 08:27:09 -05:00
|
|
|
|
|
|
|
defer func() {
|
|
|
|
if out, err := s.d.Cmd("plugin", "remove", pNameWithTag); err != nil {
|
|
|
|
c.Fatalf("Could not remove plugin: %v %s", err, out)
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
|
|
|
|
out, err = s.d.Cmd("plugin", "ls", "--filter", "capability=volumedriver")
|
2018-08-14 03:51:22 -04:00
|
|
|
c.Assert(err, checker.IsNil, check.Commentf("%s", out))
|
2016-11-23 08:27:09 -05:00
|
|
|
c.Assert(out, checker.Contains, pName)
|
|
|
|
|
|
|
|
out, err = s.d.Cmd("plugin", "ls", "--filter", "capability=authz")
|
2018-08-14 03:51:22 -04:00
|
|
|
c.Assert(err, checker.IsNil, check.Commentf("%s", out))
|
2016-11-23 08:27:09 -05:00
|
|
|
c.Assert(out, checker.Not(checker.Contains), pName)
|
|
|
|
|
|
|
|
out, err = s.d.Cmd("plugin", "ls")
|
2018-08-14 03:51:22 -04:00
|
|
|
c.Assert(err, checker.IsNil, check.Commentf("%s", out))
|
2016-11-23 08:27:09 -05:00
|
|
|
c.Assert(out, checker.Contains, pName)
|
|
|
|
}
|