self.log.debug("Role binding created")
cleanup_data.append(
{
- "delete": kubectl.delete_service_account,
+ "delete": kubectl.delete_cluster_role_binding,
"args": (metadata_name,),
}
)
uuid, created = self.loop.run_until_complete(
self.k8s_juju_conn.init_env(k8s_creds=kubeconfig)
)
-
self.assertIsNone(created)
self.assertIsNone(uuid)
+ self.kubectl.create_cluster_role.assert_called_once()
+ self.kubectl.create_service_account.assert_called_once()
+ self.kubectl.create_cluster_role_binding.assert_called_once()
+ self.kubectl.get_default_storage_class.assert_called_once()
+ self.kubectl.delete_cluster_role.assert_called_once()
+ self.kubectl.delete_service_account.assert_called_once()
+ self.kubectl.delete_cluster_role_binding.assert_called_once()
self.k8s_juju_conn.libjuju.add_k8s.assert_called_once()