Skip to content

Commit

Permalink
Merge branch 'develop2' into release/2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
memsharded committed Mar 13, 2023
2 parents 399d7ea + 6a9c229 commit 355595a
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions conans/test/integration/command_v2/search_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

from conans.errors import ConanConnectionError, ConanException
from conans.model.recipe_ref import RecipeReference
from conans.test.assets.genconanfile import GenConanfile
from conans.test.utils.tools import TestClient, TestServer


Expand Down Expand Up @@ -242,3 +243,27 @@ def test_search_wildcard(self):

self.client.run("search test_*")
assert expected_output in self.client.out


def test_no_user_channel_error():
# https://github.com/conan-io/conan/issues/13170
c = TestClient(default_server_user=True)
c.save({"conanfile.py": GenConanfile("pkg")})
c.run("export . --version=1.0")
c.run("export . --version=1.0 --user=user --channel=channel")
c.run("list *")
assert "pkg/1.0" in [s.strip() for s in str(c.out).splitlines()]
assert "pkg/1.0@user/channel" in c.out
# I want to list only those without user/channel
c.run("list pkg/*@")
assert "pkg/1.0" in c.out
assert "user/channel" not in c.out

# The same underlying logic is used in upload
c.run("upload pkg/*@ -r=default -c")
assert "Uploading recipe 'pkg/1.0" in c.out
assert "user/channel" not in c.out

c.run("search pkg/*@ -r=default")
assert "pkg/1.0" in c.out
assert "user/channel" not in c.out

0 comments on commit 355595a

Please sign in to comment.