AETHER-1027 Remove deleted edge from Prometheus metrics
Change-Id: Ia870e9c9835b1bbb7d23839134173fff360811c4
diff --git a/edge-monitoring/test_edge_monitoring_server.py b/edge-monitoring/test_edge_monitoring_server.py
index 5e4748f..423c310 100755
--- a/edge-monitoring/test_edge_monitoring_server.py
+++ b/edge-monitoring/test_edge_monitoring_server.py
@@ -131,10 +131,21 @@
data = json.loads(response.get_data(as_text=True))
self.assertEqual(len(data['edges']), 2)
+ response = self.app.get('/edges/metrics')
+ data = response.get_data(as_text=True)
+ self.assertTrue('aetheredge_status_control_plane{name="ace-menlo-pixel"} 2.0' in data)
+ self.assertTrue('aetheredge_status_user_plane{name="ace-menlo-pixel"} 2.0' in data)
+ self.assertTrue('aetheredge_last_update{name="ace-menlo-pixel"}' in data)
+
response = self.app.delete('/edges/ace-menlo-pixel')
data = json.loads(response.get_data(as_text=True))
self.assertEqual(data['result'], True)
- response = self.app.get('/edges', json=test_edge)
+
+ response = self.app.get('/edges/metrics')
+ data = response.get_data(as_text=True)
+ self.assertFalse('aetheredge_status_control_plane{name="ace-menlo-pixel"} 2.0' in data)
+ self.assertFalse('aetheredge_status_user_plane{name="ace-menlo-pixel"} 2.0' in data)
+ self.assertFalse('aetheredge_last_update{name="ace-menlo-pixel"}' in data)
response = self.app.get('/edges')
data = json.loads(response.get_data(as_text=True))