chore: make tests pass
This commit is contained in:
parent
824a94b9b7
commit
815c8a3c57
2 changed files with 8 additions and 2 deletions
|
@ -4,6 +4,7 @@ import (
|
|||
"context"
|
||||
"fmt"
|
||||
"sort"
|
||||
"strings"
|
||||
|
||||
"github.com/Khan/genqlient/graphql"
|
||||
"github.com/Masterminds/semver/v3"
|
||||
|
@ -119,9 +120,14 @@ func (r *resolvingInstance) Step() error {
|
|||
return errors.Errorf("could not find an SML version that matches constraint %s and game version %d", constraint, r.GameVersion)
|
||||
}
|
||||
|
||||
smlVersionStr := chosenSMLVersion.String()
|
||||
if !strings.HasPrefix(smlVersionStr, "v") {
|
||||
smlVersionStr = "v" + smlVersionStr
|
||||
}
|
||||
|
||||
r.OutputLock[id] = LockedMod{
|
||||
Version: chosenSMLVersion.String(),
|
||||
Link: fmt.Sprintf(smlDownloadTemplate, chosenSMLVersion.String()),
|
||||
Link: fmt.Sprintf(smlDownloadTemplate, smlVersionStr),
|
||||
Dependencies: map[string]string{},
|
||||
}
|
||||
}
|
||||
|
|
|
@ -41,7 +41,7 @@ func TestProfileResolution(t *testing.T) {
|
|||
},
|
||||
}).Resolve(resolver, nil, math.MaxInt)
|
||||
|
||||
testza.AssertEqual(t, "failed resolving profile dependencies: failed resolving dependencies. requires different versions of RefinedRDLib", err.Error())
|
||||
testza.AssertEqual(t, "failed resolving profile dependencies: mod RefinedRDLib version 1.0.6 does not match constraint ^1.0.7", err.Error())
|
||||
|
||||
_, err = (&Profile{
|
||||
Name: DefaultProfileName,
|
||||
|
|
Loading…
Reference in a new issue