refactor: migrate e2e tests from efficientgo/e2e to capytest
This commit is contained in:
		| @@ -20,25 +20,16 @@ package e2etests_test | ||||
|  | ||||
| import ( | ||||
| 	"testing" | ||||
| 	"time" | ||||
|  | ||||
| 	"github.com/efficientgo/e2e" | ||||
|  | ||||
| 	expect "github.com/tailscale/goexpect" | ||||
| 	"go.alt-gnome.ru/capytest" | ||||
| ) | ||||
|  | ||||
| func TestE2EAlrVersion(t *testing.T) { | ||||
| 	dockerMultipleRun( | ||||
| 		t, | ||||
| 		"check-version", | ||||
| 		COMMON_SYSTEMS, | ||||
| 		func(t *testing.T, r e2e.Runnable) { | ||||
| 			runTestCommands(t, r, time.Second*10, []expect.Batcher{ | ||||
| 				&expect.BSnd{S: "alr version\n"}, | ||||
| 				&expect.BExp{R: `^v\d+\.\d+\.\d+(?:-\d+-g[a-f0-9]+)?\n$`}, | ||||
| 				&expect.BSnd{S: "echo $?\n"}, | ||||
| 				&expect.BExp{R: `^0\n$`}, | ||||
| 			}) | ||||
| 		}, | ||||
| 	) | ||||
| 	runMatrixSuite(t, "version", COMMON_SYSTEMS, func(t *testing.T, r capytest.Runner) { | ||||
| 		r.Command("alr", "version"). | ||||
| 			ExpectStderrRegex(`^v\d+\.\d+\.\d+(?:-\d+-g[a-f0-9]+)?\n$`). | ||||
| 			ExpectStdoutEmpty(). | ||||
| 			ExpectSuccess(). | ||||
| 			Run(t) | ||||
| 	}) | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user