charmed-kubernetes / pytest-operator

Apache License 2.0
6 stars 13 forks source link

Is charm-tools really required? #18

Closed dstathis closed 2 years ago

dstathis commented 3 years ago
    def check_deps():
        missing = []
        for dep in ("juju", "charm", "charmcraft"):
            res = subprocess.run(["which", dep])
            if res.returncode != 0:
                missing.append(dep)
        if missing:
>           raise RuntimeError(
                "Missing dependenc{}: {}".format(
                    "y" if len(missing) == 1 else "ies",
                    ", ".join(missing),
                )
            )
E           RuntimeError: Missing dependency: charm

I ran in to this while trying to set up integration tests. Given that charmcraft basically replaces charm-tools, it would be nice if I didn't need it installed. If we really need both we could install them with pip in the virtualenv automatically.

johnsca commented 3 years ago

Yeah, that check should either be dropped or improved to not be required unless actually needed, since we intend the common case going forward to not depend on the old builder.