MCPcopy Create free account
hub / github.com/cloudbase/garm / TestGetJITConfigFileInvalidBase64

Method TestGetJITConfigFileInvalidBase64

runner/metadata_test.go:1235–1248  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1233}
1234
1235func (s *MetadataTestSuite) TestGetJITConfigFileInvalidBase64() {
1236 jitInstance := s.Fixtures.TestInstance
1237 jitInstance.JitConfiguration = map[string]string{
1238 ".runner": "invalid-base64!!!",
1239 }
1240
1241 ctx := auth.SetInstanceParams(context.Background(), jitInstance)
1242 ctx = auth.SetInstanceRunnerStatus(ctx, params.RunnerPending)
1243 ctx = auth.SetInstanceHasJITConfig(ctx, jitInstance.JitConfiguration)
1244
1245 _, err := s.Runner.GetJITConfigFile(ctx, ".runner")
1246 s.Require().NotNil(err)
1247 s.Require().Contains(err.Error(), "error decoding file contents")
1248}
1249
1250func (s *MetadataTestSuite) TestGetJITConfigFileMultipleFiles() {
1251 jitInstance := s.Fixtures.TestInstance

Callers

nothing calls this directly

Calls 5

SetInstanceParamsFunction · 0.92
SetInstanceRunnerStatusFunction · 0.92
SetInstanceHasJITConfigFunction · 0.92
GetJITConfigFileMethod · 0.80
ErrorMethod · 0.45

Tested by

no test coverage detected