diff --git a/workflow-pr/go.mod b/workflow-pr/go.mod index 10a1897..5c56700 100644 --- a/workflow-pr/go.mod +++ b/workflow-pr/go.mod @@ -1,6 +1,6 @@ module src.opensuse.org/workflow-pr -go 1.22.3 +go 1.23.2 replace src.opensuse.org/autogits/common => ../bots-common diff --git a/workflow-pr/main_test.go b/workflow-pr/main_test.go index 143e76d..b061d62 100644 --- a/workflow-pr/main_test.go +++ b/workflow-pr/main_test.go @@ -102,6 +102,7 @@ func setupGitForTests(t *testing.T, git *common.GitHandler) { {"prj", "submodule", "add", filepath.Join(git.GitPath, "foo"), "testRepo"}, {"prj", "add", ".gitmodules", "testRepo"}, {"prj", "commit", "-m", "First instance"}, + {"prj", "submodule", "deinit", "testRepo"}, {"", "clone", "prj", common.DefaultGitPrj}, {LocalCMD, "foo", "/usr/bin/touch", "file2"}, {"foo", "add", "file2"}, @@ -139,6 +140,7 @@ func TestUpdatePrBranch(t *testing.T) { t.Error(err) } + git.GitExecOrPanic("prj", "reset", "--hard", "testing") rev := strings.TrimSpace(git.GitExecWithOutputOrPanic(filepath.Join(common.DefaultGitPrj, "testRepo"), "rev-list", "-1", "HEAD")) if rev != req.Pull_Request.Head.Sha { t.Error("prj/testRepo not updated to", req.Pull_Request.Head.Sha, "but is at", rev) @@ -187,6 +189,7 @@ func TestCreatePrBranch(t *testing.T) { if rev != req.Pull_Request.Head.Sha { t.Error("prj/testRepo not updated to", req.Pull_Request.Head.Sha, "but is at", rev) t.Error(buf.String()) + // os.CopyFS("/tmp/test", os.DirFS(git.GitPath)) } }