diff options
author | Valery Piashchynski <[email protected]> | 2021-09-16 21:46:50 +0300 |
---|---|---|
committer | GitHub <[email protected]> | 2021-09-16 21:46:50 +0300 |
commit | 3581b45f237a3f7aa29591ceb2bf6f4a4642a2f5 (patch) | |
tree | e723b19ec1ac16b7ccc7b3c2da69d4a416d63d81 /plugins/server/command_test.go | |
parent | 337d292dd2d6ff0a555098b1970d8194d8df8bc2 (diff) | |
parent | 823d831b57b75f70c7c3bbbee355f2016633bb3b (diff) |
[#803]: feat(plugins): move plugins to a separate repositoryv2.5.0-alpha.2
[#803]: feat(plugins): move plugins to a separate repository
Diffstat (limited to 'plugins/server/command_test.go')
-rw-r--r-- | plugins/server/command_test.go | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/plugins/server/command_test.go b/plugins/server/command_test.go deleted file mode 100644 index 74762ccd..00000000 --- a/plugins/server/command_test.go +++ /dev/null @@ -1,43 +0,0 @@ -package server - -import ( - "strings" - "testing" - - "github.com/spiral/errors" - "github.com/stretchr/testify/assert" -) - -func TestServerCommandChecker(t *testing.T) { - s := &Plugin{} - cmd1 := "php ../../tests/client.php" - assert.NoError(t, s.scanCommand(strings.Split(cmd1, " "))) - - cmd2 := "C:/../../abcdef/client.php" - assert.Error(t, s.scanCommand(strings.Split(cmd2, " "))) - - cmd3 := "sh ./script.sh" - err := s.scanCommand(strings.Split(cmd3, " ")) - assert.Error(t, err) - if !errors.Is(errors.FileNotFound, err) { - t.Fatal("should be of filenotfound type") - } - - cmd4 := "php ../../tests/client.php --option1 --option2" - err = s.scanCommand(strings.Split(cmd4, " ")) - assert.NoError(t, err) - - cmd5 := "php ../../tests/cluent.php --option1 --option2" - err = s.scanCommand(strings.Split(cmd5, " ")) - assert.Error(t, err) - if !errors.Is(errors.FileNotFound, err) { - t.Fatal("should be of filenotfound type") - } - - cmd6 := "php 0/../../tests/cluent.php --option1 --option2" - err = s.scanCommand(strings.Split(cmd6, " ")) - assert.Error(t, err) - if errors.Is(errors.FileNotFound, err) { - t.Fatal("should be of filenotfound type") - } -} |