()
| 301 | } |
| 302 | |
| 303 | func (s *MetadataTestSuite) TestGetRunnerInstallScript() { |
| 304 | // Set up github tools cache for the entity |
| 305 | tools := []commonParams.RunnerApplicationDownload{ |
| 306 | { |
| 307 | OS: garmTesting.Ptr("linux"), |
| 308 | Architecture: garmTesting.Ptr("x64"), |
| 309 | DownloadURL: garmTesting.Ptr("https://example.com/actions-runner-linux-x64-2.0.0.tar.gz"), |
| 310 | Filename: garmTesting.Ptr("actions-runner-linux-x64-2.0.0.tar.gz"), |
| 311 | SHA256Checksum: garmTesting.Ptr("abc123"), |
| 312 | }, |
| 313 | } |
| 314 | cache.SetGithubToolsCache(s.Fixtures.TestEntity, tools) |
| 315 | |
| 316 | script, err := s.Runner.GetRunnerInstallScript(s.instanceCtx) |
| 317 | |
| 318 | s.Require().Nil(err) |
| 319 | s.Require().NotEmpty(script) |
| 320 | // Should contain the template content |
| 321 | s.Require().Contains(string(script), "Installing runner") |
| 322 | } |
| 323 | |
| 324 | func (s *MetadataTestSuite) TestGetRunnerInstallScriptUnauthorized() { |
| 325 | _, err := s.Runner.GetRunnerInstallScript(s.unauthorizedCtx) |
nothing calls this directly
no test coverage detected