A row can give the default host a different token from the host its base repository resolves to.
(tokens map[string]string)
| 2084 | // A row can give the default host a different token from the host its base |
| 2085 | // repository resolves to. |
| 2086 | func uploadTokenConfigForHosts(tokens map[string]string) func() (gh.Config, error) { |
| 2087 | var b strings.Builder |
| 2088 | b.WriteString("hosts:\n") |
| 2089 | for host, token := range tokens { |
| 2090 | fmt.Fprintf(&b, " %s:\n user: monalisa\n oauth_token: %s\n", host, token) |
| 2091 | } |
| 2092 | |
| 2093 | return func() (gh.Config, error) { |
| 2094 | return config.NewMockConfigFromString(b.String()), nil |
| 2095 | } |
| 2096 | } |
| 2097 | |
| 2098 | func Test_createRun_GHES(t *testing.T) { |
| 2099 | tests := []struct { |
no test coverage detected