MCPcopy Index your code
hub / github.com/cli/cli / makeFileUnwriteable

Function makeFileUnwriteable

internal/config/migrate_test.go:222–230  ·  view source on GitHub ↗
(t *testing.T, file string)

Source from the content-addressed store, hash-verified

220}
221
222func makeFileUnwriteable(t *testing.T, file string) {
223 t.Helper()
224
225 f, err := os.Create(file)
226 require.NoError(t, err)
227 f.Close()
228
229 require.NoError(t, os.Chmod(file, 0000))
230}
231
232func mockMigration(doFunc func(config *ghConfig.Config) error) *ghmock.MigrationMock {
233 return &ghmock.MigrationMock{

Callers 1

TestMigrationWriteErrorsFunction · 0.85

Calls 3

HelperMethod · 0.65
CreateMethod · 0.65
CloseMethod · 0.65

Tested by

no test coverage detected