Skip to content

Commit

Permalink
Remove run and test commands. (#440)
Browse files Browse the repository at this point in the history
* Remove run and test commands.

* Remove test boilerplate from all languages
  • Loading branch information
riconnon authored and zootalures committed Oct 1, 2018
1 parent af697cd commit f551ce4
Show file tree
Hide file tree
Showing 15 changed files with 31 additions and 1,285 deletions.
3 changes: 0 additions & 3 deletions commands/commands.go
Expand Up @@ -11,7 +11,6 @@ import (
"github.com/fnproject/cli/objects/log"
"github.com/fnproject/cli/objects/server"
"github.com/fnproject/cli/objects/trigger"
"github.com/fnproject/cli/run"
"github.com/urfave/cli"
)

Expand All @@ -34,10 +33,8 @@ var Commands = cmd{
"list": ListCommand(),
"migrate": MigrateCommand(),
"push": PushCommand(),
"run": run.RunCommand(),
"start": StartCommand(),
"stop": StopCommand(),
"test": TestCommand(),
"unset": UnsetCommand(),
"update": UpdateCommand(),
"use": UseCommand(),
Expand Down
3 changes: 1 addition & 2 deletions commands/invoke.go
Expand Up @@ -8,7 +8,6 @@ import (
"github.com/fnproject/cli/common"
"github.com/fnproject/cli/objects/app"
"github.com/fnproject/cli/objects/fn"
"github.com/fnproject/cli/run"
"github.com/fnproject/fn_go/clientv2"
"github.com/fnproject/fn_go/provider"
"github.com/urfave/cli"
Expand Down Expand Up @@ -77,7 +76,7 @@ func (cl *invokeCmd) Invoke(c *cli.Context) error {
return err
}

content := run.Stdin()
content := stdin()
wd := common.GetWd()

if c.String("content-type") != "" {
Expand Down
4 changes: 2 additions & 2 deletions run/run_others.go → commands/invoke_others.go
@@ -1,13 +1,13 @@
// +build !windows

package run
package commands

import (
"io"
"os"
)

func Stdin() io.Reader {
func stdin() io.Reader {
stat, err := os.Stdin.Stat()
if err != nil || (stat.Mode()&os.ModeCharDevice) != 0 {
return nil
Expand Down
15 changes: 15 additions & 0 deletions commands/invoke_windows.go
@@ -0,0 +1,15 @@
// +build windows

package commands

import (
"io"
"os"
)

func stdin() io.Reader {
if isTerminal(int(os.Stdin.Fd())) {
return nil
}
return os.Stdin
}
294 changes: 0 additions & 294 deletions commands/test.go

This file was deleted.

0 comments on commit f551ce4

Please sign in to comment.