mirror of
				https://github.com/librenms/librenms.git
				synced 2024-10-07 16:52:45 +00:00 
			
		
		
		
	ResultSet bugfix if tags key is missing in the result
This commit is contained in:
		| @@ -60,6 +60,24 @@ EOD; | ||||
|         new ResultSet($errorResult); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * We can get points from measurement | ||||
|      */ | ||||
|     public function testGetPointsFromNameWithoudTags() | ||||
|     { | ||||
|         $resultJsonExample = file_get_contents(dirname(__FILE__) . '/result-no-tags.example.json'); | ||||
|         $this->resultSet = new ResultSet($resultJsonExample); | ||||
|  | ||||
|         $measurementName = 'cpu_load_short'; | ||||
|         $expectedNumberOfPoints = 2; | ||||
|  | ||||
|         $points = $this->resultSet->getPoints($measurementName); | ||||
|  | ||||
|         $this->assertTrue(is_array($points)); | ||||
|  | ||||
|         $this->assertCount($expectedNumberOfPoints, $points); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * We can get points from measurement | ||||
|      */ | ||||
|   | ||||
		Reference in New Issue
	
	Block a user