Skip to content

Commit

Permalink
trial fix for CI differences
Browse files Browse the repository at this point in the history
  • Loading branch information
sagerb committed Dec 18, 2024
1 parent 7d15f48 commit c66b066
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion internal/interpreters/r_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ func (s *RSuite) TestResolveRExecutableWhenPassedInPathExistsButNotValid() {

err := interpreter.resolveRExecutable()
s.Error(err)
s.Equal("couldn't parse R version from command output (/Users/billsager/dev/publishing-client-another/internal/interpreters/some/R --version)", err.Error())
s.Equal(true, strings.Contains(err.Error(), "couldn't parse R version from command output"))
s.Equal(false, interpreter.IsRExecutableValid())
}

Expand Down
9 changes: 9 additions & 0 deletions internal/publish/publish_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import (
"github.com/posit-dev/publisher/internal/deployment"
"github.com/posit-dev/publisher/internal/events"
"github.com/posit-dev/publisher/internal/inspect/dependencies/renv"
"github.com/posit-dev/publisher/internal/interpreters"
"github.com/posit-dev/publisher/internal/logging"
"github.com/posit-dev/publisher/internal/logging/loggingtest"
"github.com/posit-dev/publisher/internal/project"
Expand Down Expand Up @@ -111,6 +112,14 @@ func (s *PublishSuite) SetupTest() {
cwd.Join("requirements.txt").WriteFile([]byte("flask\n"), 0600)
cwd.Join("renv.lock").WriteFile([]byte(renvLockContent), 0600)

interpreters.NewRInterpreter = func(baseDir util.AbsolutePath, rExec util.Path, log logging.Logger) interpreters.RInterpreter {
i := interpreters.NewMockRInterpreter()
i.On("Init").Return(nil)
i.On("RequiresR", mock.Anything).Return(false, nil)
i.On("GetLockFilePath").Return(util.RelativePath{}, false, nil)
return i
}

}

func (s *PublishSuite) TestNewFromState() {
Expand Down

0 comments on commit c66b066

Please sign in to comment.