Skip to content
This repository has been archived by the owner on Jan 30, 2020. It is now read-only.

agent: reenable check for nil hash in unit state publisher #1639

Merged
merged 2 commits into from
Jul 22, 2016

Conversation

dongsupark
Copy link
Contributor

Long time ago there were checks for nil unit hashes in agent.UnitStatePublisher.publishOne and registry.UnitStateToModel, but given that units could enter the system without populated hashes, the checks were disabled: 11949e0 ("agent: publish unit state regardless of hash").

However the hashes are now always populated, so the corresponding assertions should be reenabled.

Fixes #989

Long time ago there were checks for nil unit hashes in
agent.UnitStatePublisher.publishOne and registry.UnitStateToModel, but
given that units could enter the system without populated hashes, the
checks were disabled: 11949e0 ("agent: publish unit state regardless of
hash"). However the hashes are now always populated, so the corresponding
assertions should be reenabled.

Fixes coreos#989
@dongsupark dongsupark force-pushed the dongsu/fleetd-recheck-nil-hash branch 3 times, most recently from 8149e9b to d77b8e4 Compare July 16, 2016 09:57
Now that nil UnitHash is not allowed, we need to set a fake unit hash
string to each test case in TestDefaultPublisher to avoid test failures.
@dongsupark dongsupark merged commit f8b2ad2 into coreos:master Jul 22, 2016
@dongsupark dongsupark deleted the dongsu/fleetd-recheck-nil-hash branch July 22, 2016 08:57
dongsupark pushed a commit that referenced this pull request Jul 22, 2016
agent: reenable check for nil hash in unit state publisher
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant