()
| 281 | } |
| 282 | |
| 283 | func (s *MetadataTestSuite) TestGetLabelsForInstance() { |
| 284 | // Test with regular instance |
| 285 | // Since we can't easily set up the cache in tests, labels might be empty |
| 286 | // but the function should not panic |
| 287 | labels := getLabelsForInstance(s.Fixtures.TestInstance) |
| 288 | s.Require().NotNil(labels) // Should return a slice, even if empty |
| 289 | |
| 290 | // Test with JIT instance (should return empty labels) |
| 291 | jitInstance := s.Fixtures.TestInstance |
| 292 | jitInstance.JitConfiguration = map[string]string{"test": "config"} |
| 293 | jitLabels := getLabelsForInstance(jitInstance) |
| 294 | s.Require().Empty(jitLabels) |
| 295 | |
| 296 | // Test with scale set instance (should return empty labels) |
| 297 | scaleSetInstance := s.Fixtures.TestInstance |
| 298 | scaleSetInstance.ScaleSetID = 123 |
| 299 | scaleSetLabels := getLabelsForInstance(scaleSetInstance) |
| 300 | s.Require().Empty(scaleSetLabels) |
| 301 | } |
| 302 | |
| 303 | func (s *MetadataTestSuite) TestGetRunnerInstallScript() { |
| 304 | // Set up github tools cache for the entity |
nothing calls this directly
no test coverage detected