simplify undocker

This commit is contained in:
2021-05-24 00:11:58 +03:00
parent 9665574308
commit ee88c0aa9a
14 changed files with 27 additions and 731 deletions

View File

@@ -7,13 +7,11 @@ import (
"path/filepath"
"testing"
goflags "github.com/jessevdk/go-flags"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
func TestExecute(t *testing.T) {
assert.False(t, true)
var _foo = []byte("foo foo")
tests := []struct {
@@ -65,11 +63,9 @@ func TestExecute(t *testing.T) {
tt.outfile = filepath.Join(dir, tt.outfile)
}
inf := filepath.Join(dir, tt.infile)
c.PositionalArgs.Infile = goflags.Filename(inf)
c.PositionalArgs.Outfile = tt.outfile
c.flattener = flattenPassthrough
err := c.Execute(nil)
err := c.execute(inf, tt.outfile)
if tt.wantErr != "" {
require.Error(t, err)
assert.Regexp(t, tt.wantErr, err.Error())