Issues with amulet tests
Tim Van Steenburgh
tim.van.steenburgh at canonical.com
Tue Dec 6 22:46:35 UTC 2016
Not sure where it comes from but you can skip make targets by adding this
line
to your tests.yaml:
makefile: []
What version of python-jujuclient do you have?
On Tue, Dec 6, 2016 at 5:37 PM, Merlijn Sebrechts <
merlijn.sebrechts at gmail.com> wrote:
> Ok, any idea where this comes from? I have no idea what tox is and why it
> is in my final Charm. I suspect it comes from a layer. Is there a way to
> backtrace from what layer a file comes from?
>
>
> I got a bit further. Now I have the following error:
>
>
> $bundletester -t ./openvpn -e mesebrec/merlijnTest
> 2016-12-06 17:32:26 Starting deployment of sojobo:mesebrec/merlijntest
> Traceback (most recent call last):
> File "/usr/local/bin/juju-deployer", line 11, in <module>
> sys.exit(main())
> File "/usr/local/lib/python2.7/dist-packages/deployer/cli.py", line
> 140, in main
> run()
> File "/usr/local/lib/python2.7/dist-packages/deployer/cli.py", line
> 250, in run
> importer.Importer(env, deployment, options).run()
> File "/usr/local/lib/python2.7/dist-packages/deployer/action/importer.py",
> line 301, in run
> self.env.connect()
> File "/usr/local/lib/python2.7/dist-packages/deployer/env/go.py", line
> 78, in connect
> self.client = self.client_class.connect(self.name)
> File "/usr/local/lib/python2.7/dist-packages/jujuclient/environment.py",
> line 87, in connect
> return connector().run(cls, env_name)
> File "/usr/local/lib/python2.7/dist-packages/jujuclient/connector.py",
> line 41, in run
> jhome, data = self.parse_env(env_name)
> File "/usr/local/lib/python2.7/dist-packages/jujuclient/juju2/connector.py",
> line 64, in parse_env
> 'password': account['password'],
> KeyError: 'password'
> /usr/local/lib/python3.5/dist-packages/path.py:1717: DeprecationWarning:
> path is deprecated. Use Path instead.
> warnings.warn(msg, DeprecationWarning)
> E
>
>
>
>
> 2016-12-06 17:25 GMT-05:00 Tim Van Steenburgh <
> tim.van.steenburgh at canonical.com>:
>
>> Yeah, but it's not a dependency for all tests. ;)
>>
>> It's a dependency for your charm tests because your 'make test' target
>> calls tox.
>>
>> On Tue, Dec 6, 2016 at 5:22 PM, Merlijn Sebrechts <
>> merlijn.sebrechts at gmail.com> wrote:
>>
>>> Thanks for this, Tim. That seems to do the trick of the first error. Now
>>> I get a bunch of linter errors. I'll fix those and get back to you if I run
>>> into any more errors. The tox thing seems like a bug in bundletester.
>>> Shouldn't bundletester install tox if it is a dependency for all tests?
>>>
>>>
>>>
>>> Kind regards
>>> Merlijn
>>>
>>> 2016-12-06 17:15 GMT-05:00 Tim Van Steenburgh <
>>> tim.van.steenburgh at canonical.com>:
>>>
>>>> The first problem is because `make test` runs tox, but tox isn't
>>>> installed. You can
>>>> add it to your packages list in tests.yaml. I would also recommend
>>>> changing the
>>>> shebang line of your 10-deploy test to #!/usr/bin/env python3
>>>>
>>>> On Tue, Dec 6, 2016 at 4:25 PM, Merlijn Sebrechts <
>>>> merlijn.sebrechts at gmail.com> wrote:
>>>>
>>>>> Hi
>>>>>
>>>>>
>>>>> I'm trying to get my charm ready for the review queue and I'm having
>>>>> some issues getting the tests to work right.
>>>>>
>>>>> Running bundletester on the charm gives the following error:
>>>>>
>>>>> openvpn
>>>>> charm-proof
>>>>> PASS
>>>>> make test
>>>>> FAIL
>>>>>
>>>>> ------------------------------------------------------------
>>>>> ------------------
>>>>> FAIL: openvpn::make test
>>>>> [/usr/bin/make -s test exit 2]
>>>>> make: tox: Command not found
>>>>> Makefile:3: recipe for target 'test' failed
>>>>> make: *** [test] Error 127
>>>>>
>>>>>
>>>>>
>>>>> Running the test script manually also throws errors.
>>>>>
>>>>> ======================================================================
>>>>> ERROR: test_service (__main__.TestCharm)
>>>>> ----------------------------------------------------------------------
>>>>> Traceback (most recent call last):
>>>>> File "./10-deploy", line 14, in setUp
>>>>> self.d.add('openvpn')
>>>>> File "/usr/local/lib/python3.5/dist-packages/amulet/deployer.py",
>>>>> line 192, in add
>>>>> service_name, charm, branch=branch, series=service['series'])
>>>>> File "/usr/local/lib/python3.5/dist-packages/amulet/charm.py", line
>>>>> 57, in fetch
>>>>> series=series)
>>>>> File "/usr/local/lib/python3.5/dist-packages/amulet/charm.py", line
>>>>> 40, in get_charm
>>>>> return LocalCharm(charm_path, series)
>>>>> File "/usr/local/lib/python3.5/dist-packages/amulet/charm.py", line
>>>>> 72, in __init__
>>>>> raise Exception('Charm not found')
>>>>> Exception: Charm not found
>>>>>
>>>>> ----------------------------------------------------------------------
>>>>> Ran 1 test in 0.025s
>>>>>
>>>>> FAILED (errors=1)
>>>>>
>>>>>
>>>>> I'm trying to run these tests from local charms. You can find the
>>>>> charm here: https://github.com/IBCNServices/tengu-charms/tree/open
>>>>> vpn/charms/builds/openvpn
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Juju mailing list
>>>>> Juju at lists.ubuntu.com
>>>>> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailm
>>>>> an/listinfo/juju
>>>>>
>>>>>
>>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/juju/attachments/20161206/082b4797/attachment.html>
More information about the Juju
mailing list