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