Skip to content

Commit

Permalink
feat(programtest): Enable ProgramTest for Azure-Native split modules
Browse files Browse the repository at this point in the history
  • Loading branch information
AaronFriel committed Oct 17, 2022
1 parent 2950ab7 commit 3312682
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions pkg/testing/integration/program.go
Original file line number Diff line number Diff line change
Expand Up @@ -2167,10 +2167,14 @@ func (pt *ProgramTester) prepareGoProject(projinfo *engine.Projinfo) error {

// link local dependencies
for _, pkg := range pt.opts.Dependencies {

dep := getRewritePath(pkg, gopath, depRoot)

editStr := fmt.Sprintf("%s=%s", pkg, dep)
var editStr string
if strings.ContainsRune(pkg, '=') {
// Use a literal replacement path.
editStr = pkg
} else {
dep := getRewritePath(pkg, gopath, depRoot)
editStr = fmt.Sprintf("%s=%s", pkg, dep)
}
err = pt.runCommand("go-mod-edit", []string{goBin, "mod", "edit", "-replace", editStr}, cwd)
if err != nil {
return err
Expand Down

0 comments on commit 3312682

Please sign in to comment.