Skip to content

Commit

Permalink
move script to top-level, test ready to run stuff, hofmod-cli update,…
Browse files Browse the repository at this point in the history
… other fixes
verdverm committed Jun 7, 2020
1 parent dae64dc commit e6296a7
Showing 190 changed files with 1,145 additions and 895 deletions.
10 changes: 5 additions & 5 deletions .hof/shadow/Cli/cmd/hof/cmd/add_test.go
Original file line number Diff line number Diff line change
@@ -3,8 +3,8 @@ package cmd_test
import (
"testing"

"github.com/hofstadter-io/hof/lib/gotils/testscript"
"github.com/hofstadter-io/hof/lib/yagu"
"github.com/hofstadter-io/hof/script"

"github.com/hofstadter-io/hof/cmd/hof/cmd"
)
@@ -17,18 +17,18 @@ func TestScriptAddCliTests(t *testing.T) {
workdir := ".workdir/cli/" + dir
yagu.Mkdir(workdir)

testscript.Run(t, testscript.Params{
Setup: func(env *testscript.Env) error {
script.Run(t, script.Params{
Setup: func(env *script.Env) error {
// add any environment variables for your tests here

env.Vars = append(env.Vars, "HOF_TELEMETRY_DISABLED=1")

return nil
},
Funcs: map[string]func(ts *testscript.TestScript, args []string) error{
Funcs: map[string]func(ts *script.Script, args []string) error{
"__hof": cmd.CallTS,
},
Dir: "testscripts/cli/add",
Dir: "hls/cli/add",
WorkdirRoot: workdir,
})
}
10 changes: 5 additions & 5 deletions .hof/shadow/Cli/cmd/hof/cmd/auth_test.go
Original file line number Diff line number Diff line change
@@ -3,8 +3,8 @@ package cmd_test
import (
"testing"

"github.com/hofstadter-io/hof/lib/gotils/testscript"
"github.com/hofstadter-io/hof/lib/yagu"
"github.com/hofstadter-io/hof/script"

"github.com/hofstadter-io/hof/cmd/hof/cmd"
)
@@ -17,18 +17,18 @@ func TestScriptAuthCliTests(t *testing.T) {
workdir := ".workdir/cli/" + dir
yagu.Mkdir(workdir)

testscript.Run(t, testscript.Params{
Setup: func(env *testscript.Env) error {
script.Run(t, script.Params{
Setup: func(env *script.Env) error {
// add any environment variables for your tests here

env.Vars = append(env.Vars, "HOF_TELEMETRY_DISABLED=1")

return nil
},
Funcs: map[string]func(ts *testscript.TestScript, args []string) error{
Funcs: map[string]func(ts *script.Script, args []string) error{
"__hof": cmd.CallTS,
},
Dir: "testscripts/cli/auth",
Dir: "hls/cli/auth",
WorkdirRoot: workdir,
})
}
10 changes: 5 additions & 5 deletions .hof/shadow/Cli/cmd/hof/cmd/bisect_test.go
Original file line number Diff line number Diff line change
@@ -3,8 +3,8 @@ package cmd_test
import (
"testing"

"github.com/hofstadter-io/hof/lib/gotils/testscript"
"github.com/hofstadter-io/hof/lib/yagu"
"github.com/hofstadter-io/hof/script"

"github.com/hofstadter-io/hof/cmd/hof/cmd"
)
@@ -17,18 +17,18 @@ func TestScriptBisectCliTests(t *testing.T) {
workdir := ".workdir/cli/" + dir
yagu.Mkdir(workdir)

testscript.Run(t, testscript.Params{
Setup: func(env *testscript.Env) error {
script.Run(t, script.Params{
Setup: func(env *script.Env) error {
// add any environment variables for your tests here

env.Vars = append(env.Vars, "HOF_TELEMETRY_DISABLED=1")

return nil
},
Funcs: map[string]func(ts *testscript.TestScript, args []string) error{
Funcs: map[string]func(ts *script.Script, args []string) error{
"__hof": cmd.CallTS,
},
Dir: "testscripts/cli/bisect",
Dir: "hls/cli/bisect",
WorkdirRoot: workdir,
})
}
10 changes: 5 additions & 5 deletions .hof/shadow/Cli/cmd/hof/cmd/branch_test.go
Original file line number Diff line number Diff line change
@@ -3,8 +3,8 @@ package cmd_test
import (
"testing"

"github.com/hofstadter-io/hof/lib/gotils/testscript"
"github.com/hofstadter-io/hof/lib/yagu"
"github.com/hofstadter-io/hof/script"

"github.com/hofstadter-io/hof/cmd/hof/cmd"
)
@@ -17,18 +17,18 @@ func TestScriptBranchCliTests(t *testing.T) {
workdir := ".workdir/cli/" + dir
yagu.Mkdir(workdir)

testscript.Run(t, testscript.Params{
Setup: func(env *testscript.Env) error {
script.Run(t, script.Params{
Setup: func(env *script.Env) error {
// add any environment variables for your tests here

env.Vars = append(env.Vars, "HOF_TELEMETRY_DISABLED=1")

return nil
},
Funcs: map[string]func(ts *testscript.TestScript, args []string) error{
Funcs: map[string]func(ts *script.Script, args []string) error{
"__hof": cmd.CallTS,
},
Dir: "testscripts/cli/branch",
Dir: "hls/cli/branch",
WorkdirRoot: workdir,
})
}
10 changes: 5 additions & 5 deletions .hof/shadow/Cli/cmd/hof/cmd/checkout_test.go
Original file line number Diff line number Diff line change
@@ -3,8 +3,8 @@ package cmd_test
import (
"testing"

"github.com/hofstadter-io/hof/lib/gotils/testscript"
"github.com/hofstadter-io/hof/lib/yagu"
"github.com/hofstadter-io/hof/script"

"github.com/hofstadter-io/hof/cmd/hof/cmd"
)
@@ -17,18 +17,18 @@ func TestScriptCheckoutCliTests(t *testing.T) {
workdir := ".workdir/cli/" + dir
yagu.Mkdir(workdir)

testscript.Run(t, testscript.Params{
Setup: func(env *testscript.Env) error {
script.Run(t, script.Params{
Setup: func(env *script.Env) error {
// add any environment variables for your tests here

env.Vars = append(env.Vars, "HOF_TELEMETRY_DISABLED=1")

return nil
},
Funcs: map[string]func(ts *testscript.TestScript, args []string) error{
Funcs: map[string]func(ts *script.Script, args []string) error{
"__hof": cmd.CallTS,
},
Dir: "testscripts/cli/checkout",
Dir: "hls/cli/checkout",
WorkdirRoot: workdir,
})
}
10 changes: 5 additions & 5 deletions .hof/shadow/Cli/cmd/hof/cmd/clone_test.go
Original file line number Diff line number Diff line change
@@ -3,8 +3,8 @@ package cmd_test
import (
"testing"

"github.com/hofstadter-io/hof/lib/gotils/testscript"
"github.com/hofstadter-io/hof/lib/yagu"
"github.com/hofstadter-io/hof/script"

"github.com/hofstadter-io/hof/cmd/hof/cmd"
)
@@ -17,18 +17,18 @@ func TestScriptCloneCliTests(t *testing.T) {
workdir := ".workdir/cli/" + dir
yagu.Mkdir(workdir)

testscript.Run(t, testscript.Params{
Setup: func(env *testscript.Env) error {
script.Run(t, script.Params{
Setup: func(env *script.Env) error {
// add any environment variables for your tests here

env.Vars = append(env.Vars, "HOF_TELEMETRY_DISABLED=1")

return nil
},
Funcs: map[string]func(ts *testscript.TestScript, args []string) error{
Funcs: map[string]func(ts *script.Script, args []string) error{
"__hof": cmd.CallTS,
},
Dir: "testscripts/cli/clone",
Dir: "hls/cli/clone",
WorkdirRoot: workdir,
})
}
10 changes: 5 additions & 5 deletions .hof/shadow/Cli/cmd/hof/cmd/cmd_test.go
Original file line number Diff line number Diff line change
@@ -3,8 +3,8 @@ package cmd_test
import (
"testing"

"github.com/hofstadter-io/hof/lib/gotils/testscript"
"github.com/hofstadter-io/hof/lib/yagu"
"github.com/hofstadter-io/hof/script"

"github.com/hofstadter-io/hof/cmd/hof/cmd"
)
@@ -17,18 +17,18 @@ func TestScriptCmdCliTests(t *testing.T) {
workdir := ".workdir/cli/" + dir
yagu.Mkdir(workdir)

testscript.Run(t, testscript.Params{
Setup: func(env *testscript.Env) error {
script.Run(t, script.Params{
Setup: func(env *script.Env) error {
// add any environment variables for your tests here

env.Vars = append(env.Vars, "HOF_TELEMETRY_DISABLED=1")

return nil
},
Funcs: map[string]func(ts *testscript.TestScript, args []string) error{
Funcs: map[string]func(ts *script.Script, args []string) error{
"__hof": cmd.CallTS,
},
Dir: "testscripts/cli/cmd",
Dir: "hls/cli/cmd",
WorkdirRoot: workdir,
})
}
10 changes: 5 additions & 5 deletions .hof/shadow/Cli/cmd/hof/cmd/commit_test.go
Original file line number Diff line number Diff line change
@@ -3,8 +3,8 @@ package cmd_test
import (
"testing"

"github.com/hofstadter-io/hof/lib/gotils/testscript"
"github.com/hofstadter-io/hof/lib/yagu"
"github.com/hofstadter-io/hof/script"

"github.com/hofstadter-io/hof/cmd/hof/cmd"
)
@@ -17,18 +17,18 @@ func TestScriptCommitCliTests(t *testing.T) {
workdir := ".workdir/cli/" + dir
yagu.Mkdir(workdir)

testscript.Run(t, testscript.Params{
Setup: func(env *testscript.Env) error {
script.Run(t, script.Params{
Setup: func(env *script.Env) error {
// add any environment variables for your tests here

env.Vars = append(env.Vars, "HOF_TELEMETRY_DISABLED=1")

return nil
},
Funcs: map[string]func(ts *testscript.TestScript, args []string) error{
Funcs: map[string]func(ts *script.Script, args []string) error{
"__hof": cmd.CallTS,
},
Dir: "testscripts/cli/commit",
Dir: "hls/cli/commit",
WorkdirRoot: workdir,
})
}
10 changes: 5 additions & 5 deletions .hof/shadow/Cli/cmd/hof/cmd/config_test.go
Original file line number Diff line number Diff line change
@@ -3,8 +3,8 @@ package cmd_test
import (
"testing"

"github.com/hofstadter-io/hof/lib/gotils/testscript"
"github.com/hofstadter-io/hof/lib/yagu"
"github.com/hofstadter-io/hof/script"

"github.com/hofstadter-io/hof/cmd/hof/cmd"
)
@@ -17,18 +17,18 @@ func TestScriptConfigCliTests(t *testing.T) {
workdir := ".workdir/cli/" + dir
yagu.Mkdir(workdir)

testscript.Run(t, testscript.Params{
Setup: func(env *testscript.Env) error {
script.Run(t, script.Params{
Setup: func(env *script.Env) error {
// add any environment variables for your tests here

env.Vars = append(env.Vars, "HOF_TELEMETRY_DISABLED=1")

return nil
},
Funcs: map[string]func(ts *testscript.TestScript, args []string) error{
Funcs: map[string]func(ts *script.Script, args []string) error{
"__hof": cmd.CallTS,
},
Dir: "testscripts/cli/config",
Dir: "hls/cli/config",
WorkdirRoot: workdir,
})
}
10 changes: 5 additions & 5 deletions .hof/shadow/Cli/cmd/hof/cmd/context_test.go
Original file line number Diff line number Diff line change
@@ -3,8 +3,8 @@ package cmd_test
import (
"testing"

"github.com/hofstadter-io/hof/lib/gotils/testscript"
"github.com/hofstadter-io/hof/lib/yagu"
"github.com/hofstadter-io/hof/script"

"github.com/hofstadter-io/hof/cmd/hof/cmd"
)
@@ -17,18 +17,18 @@ func TestScriptContextCliTests(t *testing.T) {
workdir := ".workdir/cli/" + dir
yagu.Mkdir(workdir)

testscript.Run(t, testscript.Params{
Setup: func(env *testscript.Env) error {
script.Run(t, script.Params{
Setup: func(env *script.Env) error {
// add any environment variables for your tests here

env.Vars = append(env.Vars, "HOF_TELEMETRY_DISABLED=1")

return nil
},
Funcs: map[string]func(ts *testscript.TestScript, args []string) error{
Funcs: map[string]func(ts *script.Script, args []string) error{
"__hof": cmd.CallTS,
},
Dir: "testscripts/cli/context",
Dir: "hls/cli/context",
WorkdirRoot: workdir,
})
}
10 changes: 5 additions & 5 deletions .hof/shadow/Cli/cmd/hof/cmd/create_test.go
Original file line number Diff line number Diff line change
@@ -3,8 +3,8 @@ package cmd_test
import (
"testing"

"github.com/hofstadter-io/hof/lib/gotils/testscript"
"github.com/hofstadter-io/hof/lib/yagu"
"github.com/hofstadter-io/hof/script"

"github.com/hofstadter-io/hof/cmd/hof/cmd"
)
@@ -17,18 +17,18 @@ func TestScriptCreateCliTests(t *testing.T) {
workdir := ".workdir/cli/" + dir
yagu.Mkdir(workdir)

testscript.Run(t, testscript.Params{
Setup: func(env *testscript.Env) error {
script.Run(t, script.Params{
Setup: func(env *script.Env) error {
// add any environment variables for your tests here

env.Vars = append(env.Vars, "HOF_TELEMETRY_DISABLED=1")

return nil
},
Funcs: map[string]func(ts *testscript.TestScript, args []string) error{
Funcs: map[string]func(ts *script.Script, args []string) error{
"__hof": cmd.CallTS,
},
Dir: "testscripts/cli/create",
Dir: "hls/cli/create",
WorkdirRoot: workdir,
})
}
10 changes: 5 additions & 5 deletions .hof/shadow/Cli/cmd/hof/cmd/datamodel_test.go
Original file line number Diff line number Diff line change
@@ -3,8 +3,8 @@ package cmd_test
import (
"testing"

"github.com/hofstadter-io/hof/lib/gotils/testscript"
"github.com/hofstadter-io/hof/lib/yagu"
"github.com/hofstadter-io/hof/script"

"github.com/hofstadter-io/hof/cmd/hof/cmd"
)
@@ -17,18 +17,18 @@ func TestScriptDatamodelCliTests(t *testing.T) {
workdir := ".workdir/cli/" + dir
yagu.Mkdir(workdir)

testscript.Run(t, testscript.Params{
Setup: func(env *testscript.Env) error {
script.Run(t, script.Params{
Setup: func(env *script.Env) error {
// add any environment variables for your tests here

env.Vars = append(env.Vars, "HOF_TELEMETRY_DISABLED=1")

return nil
},
Funcs: map[string]func(ts *testscript.TestScript, args []string) error{
Funcs: map[string]func(ts *script.Script, args []string) error{
"__hof": cmd.CallTS,
},
Dir: "testscripts/cli/datamodel",
Dir: "hls/cli/datamodel",
WorkdirRoot: workdir,
})
}
Loading

0 comments on commit e6296a7

Please sign in to comment.