(contents: string)
| 126 | }) |
| 127 | |
| 128 | async function createApiKeyHelperScript(contents: string): Promise<string> { |
| 129 | const helperPath = join(tempConfigDir, 'api-key-helper.sh') |
| 130 | await writeFile( |
| 131 | helperPath, |
| 132 | `#!/bin/sh\nprintf '%s\\n' '${contents.replaceAll("'", "'\"'\"'")}'\n`, |
| 133 | 'utf8', |
| 134 | ) |
| 135 | await chmod(helperPath, 0o700) |
| 136 | return helperPath |
| 137 | } |
| 138 | |
| 139 | describe('AuthRuntime', () => { |
| 140 | it('reports expired managed auth truthfully in the canonical status view', async () => { |