[test-runner] Injected methods do not provide access to the original (target) object
Bug #1596872 reported by
Alexander Tivelkov
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Murano |
Opinion
|
Medium
|
Unassigned |
Bug Description
When a method in a test-runner's TestFixture is injected into some existing class or object the injected code does not have access to the original object it is injected to: in the method's execution context $this will mean the object owning the injected method (e.g. a Fixture), not the object the method is injected to.
Changed in murano: | |
importance: | Undecided → Medium |
tags: | added: test-runner |
Changed in murano: | |
milestone: | none → newton-2 |
Changed in murano: | |
milestone: | newton-2 → newton-3 |
Changed in murano: | |
status: | New → Confirmed |
Changed in murano: | |
milestone: | newton-3 → newton-rc1 |
To post a comment you must log in.
Isn't it done for purpose to be able to call $.assertEqual and to increment counters on Fixture object, like it is done in TomcatTest?
# Mock method to replace the original one
Contract: $
Contract: $
Contract: $
Default: null 'Deploy Tomcat', $template.Name)
agentMock:
Arguments:
- template:
- resources:
- timeout:
Body:
- $.log.info('Mocking murano agent')
- $.assertEqual(
- $.agentCallCount: $.agentCallCount + 1