Remove historical inspection commands
This commit is contained in:
@@ -1,8 +1,11 @@
|
||||
package cli
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"context"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
@@ -40,3 +43,17 @@ func TestResolveRunActionConstructsOneExecutor(t *testing.T) {
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func TestInspectCommandIsUnknownAndAbsentFromHelp(t *testing.T) {
|
||||
var stdout, stderr bytes.Buffer
|
||||
err := (Runner{}).Run(context.Background(), []string{"inspect", "reports"}, &stdout, &stderr)
|
||||
if err == nil || err.Error() != `unknown command "inspect"` {
|
||||
t.Fatalf("Run(inspect) error = %v", err)
|
||||
}
|
||||
if err := (Runner{}).Run(context.Background(), []string{"--help"}, &stdout, &stderr); err != nil {
|
||||
t.Fatalf("Run(--help) error = %v", err)
|
||||
}
|
||||
if strings.Contains(stdout.String(), "inspect") {
|
||||
t.Fatalf("help contains removed inspect command:\n%s", stdout.String())
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user