Commit Graph

2 Commits

Author SHA1 Message Date
Vsevolod Fedorov 6b92807cd7 Tests: Rename yamlparser tests and fixture directories
Rename fixtures directory to job_fixtures to prepare for adding view_fixtures
directory in the following commits.

Change-Id: Ic20997cae020b542ddc22bf444fa6b92fbcae064
2023-01-26 11:06:23 +03:00
Tomas Janousek cd651c4b80 hipchat_notif: Fix compatibility dispatch
This fixes the following error message that is produced when using the
old hipchat module in a real world scenario (as opposed to a synthetic
test):

    jenkins_jobs.errors.JenkinsJobsException: Unknown entry point or macro 'name' for component type: 'publisher'.

It works in the tests/hipchat/fixtures/hipchat005.yaml test because
the `data` dict contains only the 'hipchat' key, but when used in a
job-template, the dict contains a lot more, e.g. 'name', 'project-type',
'description' etc.

To make testing more difficult, `data` is not an OrderedDict, but dict
(see YamlParser._applyDefaults), so it behaves differently across python
versions, due to different order of dict.items (hash randomization, ...).
Therefore the test contains seemingly unnecessary fields like
'project-type', 'scm' and 'description'. Without these, it would pass
without the fix on at least one of py27, py35, py36, and it's rather
likely I haven't covered all possible scenarios (different platforms?).

Change-Id: Ie45084f1a4d6405d7e60dde5fce619a66dc026db
2018-02-01 11:43:51 +01:00