diff --git a/xos/synchronizer/tests/test_sync_configmap.py b/xos/synchronizer/tests/test_sync_configmap.py
index 1ebd9e8..efc1111 100644
--- a/xos/synchronizer/tests/test_sync_configmap.py
+++ b/xos/synchronizer/tests/test_sync_configmap.py
@@ -118,6 +118,24 @@
 
             self.assertEqual(configmap.backend_handle, "1234")
 
+    def test_delete_record(self):
+        with patch.object(self.step_class, "init_kubernetes_client", new=fake_init_kubernetes_client):
+            data = {"foo": "bar"}
+            configmap = KubernetesConfigMap(trust_domain=self.trust_domain, name="test-configmap", data=json.dumps(data))
+
+            orig_map = MagicMock()
+            orig_map.data = {"foo": "not_bar"}
+            orig_map.metadata.self_link = "1234"
+
+            step = self.step_class()
+            step.v1core.read_namespaced_config_map.return_value = orig_map
+
+            step.delete_record(configmap)
+
+            step.v1core.delete_namespaced_config_map.assert_called_with("test-configmap", self.trust_domain.name, ANY)
+
+
+
 
 if __name__ == '__main__':
     unittest.main()
diff --git a/xos/synchronizer/tests/test_sync_kubernetesserviceinstance.py b/xos/synchronizer/tests/test_sync_kubernetesserviceinstance.py
index 9bf285a..2a20868 100644
--- a/xos/synchronizer/tests/test_sync_kubernetesserviceinstance.py
+++ b/xos/synchronizer/tests/test_sync_kubernetesserviceinstance.py
@@ -95,5 +95,18 @@
             step.v1core.create_namespaced_pod.assert_called()
             self.assertEqual(xos_si.backend_handle, "1234")
 
+    def test_delete_record(self):
+        with patch.object(self.step_class, "init_kubernetes_client", new=fake_init_kubernetes_client):
+            xos_si = KubernetesServiceInstance(name="test-instance", slice=self.slice, image=self.image)
+            xos_si.kubernetes_config_volume_mounts = self.MockObjectList([])
+            xos_si.kubernetes_secret_volume_mounts = self.MockObjectList([])
+
+            step = self.step_class()
+            pod = MagicMock()
+            step.v1core.read_namespaced_pod.return_value = pod
+
+            step.delete_record(xos_si)
+            step.v1core.delete_namespaced_pod.assert_called_with("test-instance", self.trust_domain.name, ANY)
+
 if __name__ == '__main__':
     unittest.main()
diff --git a/xos/synchronizer/tests/test_sync_principal.py b/xos/synchronizer/tests/test_sync_principal.py
index 81f9b30..3a55eb4 100644
--- a/xos/synchronizer/tests/test_sync_principal.py
+++ b/xos/synchronizer/tests/test_sync_principal.py
@@ -88,5 +88,17 @@
             step.v1core.create_namespaced_service_account.assert_called()
             self.assertEqual(xos_principal.backend_handle, "1234")
 
+    def test_delete_record(self):
+        with patch.object(self.step_class, "init_kubernetes_client", new=fake_init_kubernetes_client):
+            xos_principal = Principal(name="test-principal", trust_domain=self.trust_domain)
+
+            step = self.step_class()
+            k8s_sa = MagicMock()
+            step.v1core.read_namespaced_service_account.return_value = k8s_sa
+
+            step.delete_record(xos_principal)
+
+            step.v1core.delete_namespaced_service_account.assert_called_with("test-principal", self.trust_domain.name, ANY)
+
 if __name__ == '__main__':
     unittest.main()
diff --git a/xos/synchronizer/tests/test_sync_secret.py b/xos/synchronizer/tests/test_sync_secret.py
index ba7b39e..632adf6 100644
--- a/xos/synchronizer/tests/test_sync_secret.py
+++ b/xos/synchronizer/tests/test_sync_secret.py
@@ -118,6 +118,22 @@
 
             self.assertEqual(xos_secret.backend_handle, "1234")
 
+    def test_delete_record(self):
+        with patch.object(self.step_class, "init_kubernetes_client", new=fake_init_kubernetes_client):
+            data = {"foo": "bar"}
+            xos_secret = KubernetesSecret(trust_domain=self.trust_domain, name="test-secret", data=json.dumps(data))
+
+            orig_secret = MagicMock()
+            orig_secret.data = {"foo": "not_bar"}
+            orig_secret.metadata.self_link = "1234"
+
+            step = self.step_class()
+            step.v1core.read_namespaced_secret.return_value = orig_secret
+
+            step.delete_record(xos_secret)
+
+            step.v1core.delete_namespaced_secret.assert_called_with("test-secret", self.trust_domain.name, ANY)
+
 
 if __name__ == '__main__':
     unittest.main()
diff --git a/xos/synchronizer/tests/test_sync_service.py b/xos/synchronizer/tests/test_sync_service.py
index 550d0c2..3030193 100644
--- a/xos/synchronizer/tests/test_sync_service.py
+++ b/xos/synchronizer/tests/test_sync_service.py
@@ -60,7 +60,7 @@
             service = MagicMock()
             step.v1core.read_namespaced_service.return_value = service
 
-            result = step.get_service(xos_service, self.trust_domain)
+            result = step.get_service(xos_service, self.trust_domain.name)
 
             self.assertEqual(result, service)
             step.v1core.read_namespaced_service.assert_called_with("test-service", "test-trust")
@@ -74,7 +74,7 @@
             step = self.step_class()
             step.v1core.read_namespaced_service.side_effect = step.ApiException(status=404)
 
-            result = step.get_service(xos_service, self.trust_domain)
+            result = step.get_service(xos_service, self.trust_domain.name)
 
             self.assertEqual(result, None)
 
@@ -100,5 +100,24 @@
             step.v1core.create_namespaced_service.assert_called()
             self.assertEqual(xos_service.backend_handle, "1234")
 
+    def test_delete_record(self):
+        with patch.object(self.step_class, "init_kubernetes_client", new=fake_init_kubernetes_client):
+            xos_service = Service(name="test-service")
+            xos_slice = Slice(service=xos_service, trust_domain=self.trust_domain)
+            xos_service.slices = self.MockObjectList([xos_slice])
+
+            xos_serviceport = ServicePort(service=xos_service, name="web", external_port=123, internal_port=345,
+                                          protocol="TCP")
+            xos_service.serviceports=self.MockObjectList([xos_serviceport])
+
+            step = self.step_class()
+            k8s_service = MagicMock()
+            step.v1core.read_namespaced_service.return_value = k8s_service
+            step.v1core.delete_namespaced_service.return_value = None
+
+            step.delete_record(xos_service)
+
+            step.v1core.delete_namespaced_service.assert_called_with("test-service", self.trust_domain.name, ANY)
+
 if __name__ == '__main__':
     unittest.main()
diff --git a/xos/synchronizer/tests/test_sync_trustdomain.py b/xos/synchronizer/tests/test_sync_trustdomain.py
index 1695b26..4b12b9a 100644
--- a/xos/synchronizer/tests/test_sync_trustdomain.py
+++ b/xos/synchronizer/tests/test_sync_trustdomain.py
@@ -87,5 +87,17 @@
             step.v1core.create_namespace.assert_called()
             self.assertEqual(xos_trustdomain.backend_handle, "1234")
 
+    def test_delete_record(self):
+        with patch.object(self.step_class, "init_kubernetes_client", new=fake_init_kubernetes_client):
+            xos_trustdomain = TrustDomain(name="test-trust")
+
+            step = self.step_class()
+            td = MagicMock()
+            step.v1core.read_namespace.return_value = td
+
+            step.delete_record(xos_trustdomain)
+
+            step.v1core.delete_namespace.assert_called_with("test-trust", ANY)
+
 if __name__ == '__main__':
     unittest.main()
