add set-ref command and refactor tests
This commit is contained in:
		| @@ -21,7 +21,6 @@ package e2etests_test | ||||
| import ( | ||||
| 	"testing" | ||||
|  | ||||
| 	"github.com/alecthomas/assert/v2" | ||||
| 	"github.com/efficientgo/e2e" | ||||
| ) | ||||
|  | ||||
| @@ -31,26 +30,9 @@ func TestE2EGroupAndSummaryField(t *testing.T) { | ||||
| 		"group-and-summary-field", | ||||
| 		RPM_SYSTEMS, | ||||
| 		func(t *testing.T, r e2e.Runnable) { | ||||
| 			err := r.Exec(e2e.NewCommand( | ||||
| 				"sudo", | ||||
| 				"alr", | ||||
| 				"addrepo", | ||||
| 				"--name", | ||||
| 				"alr-repo", | ||||
| 				"--url", | ||||
| 				"https://gitea.plemya-x.ru/Maks1mS/repo-for-tests.git", | ||||
| 			)) | ||||
| 			assert.NoError(t, err) | ||||
|  | ||||
| 			err = r.Exec(e2e.NewCommand( | ||||
| 				"sh", "-c", "alr search --name test-group-and-summary --format \"{{.Group}}\" | grep ^System/Base$", | ||||
| 			)) | ||||
| 			assert.NoError(t, err) | ||||
|  | ||||
| 			err = r.Exec(e2e.NewCommand( | ||||
| 				"sh", "-c", "alr search --name test-group-and-summary --format \"{{.Summary}}\" | grep \"^Custom summary$\"", | ||||
| 			)) | ||||
| 			assert.NoError(t, err) | ||||
| 			defaultPrepare(t, r) | ||||
| 			execShouldNoError(t, r, "sh", "-c", "alr search --name test-group-and-summary --format \"{{.Group}}\" | grep ^System/Base$") | ||||
| 			execShouldNoError(t, r, "sh", "-c", "alr search --name test-group-and-summary --format \"{{.Summary}}\" | grep \"^Custom summary$\"") | ||||
| 		}, | ||||
| 	) | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user