add set-ref command and refactor tests
All checks were successful
E2E / tests (pull_request) Successful in 1m42s
Pre-commit / pre-commit (pull_request) Successful in 1m23s

This commit is contained in:
2025-05-16 20:48:14 +03:00
parent eb2356458c
commit f92bd7089a
18 changed files with 207 additions and 274 deletions

View File

@ -22,7 +22,6 @@ import (
"testing"
"github.com/efficientgo/e2e"
"github.com/stretchr/testify/assert"
)
func TestE2EIssue81MultiplePackages(t *testing.T) {
@ -31,29 +30,9 @@ func TestE2EIssue81MultiplePackages(t *testing.T) {
"issue-81-multiple-packages",
COMMON_SYSTEMS,
func(t *testing.T, r e2e.Runnable) {
err := r.Exec(e2e.NewCommand(
"sudo",
"alr",
"addrepo",
"--name",
"alr-repo",
"--url",
REPO_FOR_E2E_TESTS,
))
assert.NoError(t, err)
err = r.Exec(e2e.NewCommand(
"sudo", "alr", "ref",
))
assert.NoError(t, err)
err = r.Exec(e2e.NewCommand(
"sudo", "alr", "in", "first-package-with-dashes",
))
assert.NoError(t, err)
err = r.Exec(e2e.NewCommand("cat", "/opt/first-package"))
assert.NoError(t, err)
defaultPrepare(t, r)
execShouldNoError(t, r, "sudo", "alr", "in", "first-package-with-dashes")
execShouldNoError(t, r, "cat", "/opt/first-package")
},
)
}