Пример #1
0
func checkGet(c *gc.C, st *state.State, tag names.MachineTag, expected state.SSHHostKeys) {
	keysGot, err := st.GetSSHHostKeys(tag)
	c.Assert(err, jc.ErrorIsNil)
	c.Check(keysGot, gc.DeepEquals, expected)
}
Пример #2
0
func checkKeysNotFound(c *gc.C, st *state.State, tag names.MachineTag) {
	_, err := st.GetSSHHostKeys(tag)
	c.Check(errors.IsNotFound(err), jc.IsTrue)
	c.Check(err, gc.ErrorMatches, "keys not found")
}