Skip to content

Commit

Permalink
Change Upstream occurences to GitUpstream after renaming (packit#2469)
Browse files Browse the repository at this point in the history
Change Upstream occurences to GitUpstream after renaming

Followup of packit/packit#2354

Reviewed-by: Nikola Forró
  • Loading branch information
softwarefactory-project-zuul[bot] authored Jul 23, 2024
2 parents 9811d01 + ab81fae commit 9e2e27d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
4 changes: 2 additions & 2 deletions tests/integration/test_pr_comment.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
from packit.distgit import DistGit
from packit.exceptions import PackitConfigException
from packit.local_project import LocalProject, LocalProjectBuilder
from packit.upstream import Upstream
from packit.upstream import GitUpstream
from packit.utils.koji_helper import KojiHelper
from packit_service.config import ServiceConfig
from packit_service.constants import (
Expand Down Expand Up @@ -2657,7 +2657,7 @@ def test_pull_from_upstream_retrigger_via_dist_git_pr_comment(pagure_pr_comment_
AuthMethod.token
).once()

flexmock(Upstream).should_receive("get_last_tag").and_return("7.0.3")
flexmock(GitUpstream).should_receive("get_last_tag").and_return("7.0.3")

flexmock(Allowlist, check_and_report=True)
flexmock(PackitAPIWithDownstreamMixin).should_receive("is_packager").and_return(
Expand Down
12 changes: 7 additions & 5 deletions tests/unit/test_koji_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
PackageConfig,
)
from packit.exceptions import PackitCommandFailedError
from packit.upstream import Upstream
from packit.upstream import GitUpstream
from packit_service import sentry_integration
from packit_service.config import ServiceConfig
from packit_service.models import (
Expand Down Expand Up @@ -168,7 +168,7 @@ def test_koji_build_check_names(
flexmock(PackitAPI).should_receive("create_srpm").and_return("my.srpm")

# koji build
flexmock(Upstream).should_receive("koji_build").and_return(
flexmock(GitUpstream).should_receive("koji_build").and_return(
"Uploading srpm: /python-ogr-0.11.1"
".dev21+gf2dec9b-1.20200407142424746041.21.gf2dec9b.fc31.src.rpm\n"
"[====================================] 100% 00:00:11 1.67 MiB 148.10 KiB/sec\n"
Expand Down Expand Up @@ -370,7 +370,7 @@ def test_koji_build_with_multiple_targets(
flexmock(PackitAPI).should_receive("create_srpm").and_return("my.srpm")

# koji build
flexmock(Upstream).should_receive("koji_build").and_return(
flexmock(GitUpstream).should_receive("koji_build").and_return(
"Uploading srpm: /python-ogr-0.11.1"
".dev21+gf2dec9b-1.20200407142424746041.21.gf2dec9b.fc31.src.rpm\n"
"[====================================] 100% 00:00:11 1.67 MiB 148.10 KiB/sec\n"
Expand Down Expand Up @@ -447,7 +447,9 @@ def test_koji_build_failed(github_pr_event, add_pull_request_event_with_sha_528b

# koji build
flexmock(sentry_integration).should_receive("send_to_sentry").and_return().once()
flexmock(Upstream).should_receive("koji_build").and_raise(Exception, "some error")
flexmock(GitUpstream).should_receive("koji_build").and_raise(
Exception, "some error"
)

result = helper.run_koji_build()
assert not result["success"]
Expand Down Expand Up @@ -569,7 +571,7 @@ def test_koji_build_targets_override(
flexmock(PackitAPI).should_receive("create_srpm").and_return("my.srpm")

# koji build
flexmock(Upstream).should_receive("koji_build").once().with_args(
flexmock(GitUpstream).should_receive("koji_build").once().with_args(
scratch=True,
nowait=True,
koji_target="bright-future",
Expand Down

0 comments on commit 9e2e27d

Please sign in to comment.