INNER CODE UNIT · Go
readCIIsolationWorkflow
minekube/gate · ci_write_token_isolation_test.go:58
func readCIIsolationWorkflow(t *testing.T) (ciIsolationWorkflow, string) {
return readCIIsolationWorkflowAt(t, ciWorkflowPath)
}
func readCIIsolationWorkflowAt(t *testing.T, path string) (ciIsolationWorkflow, string) {
t.Helper()
raw, err := os.ReadFile(path)
if err != nil {
t.Fatal(err)
}
var workflow ciIsolationWorkflow
if err := yaml.Unmarshal(raw, &workflow); err != nil {
t.Fatal(err)
}
return workflow, string(raw)
}