MCPcopy Create free account
hub / github.com/auth0/auth0-cli / createTempConfigFile

Function createTempConfigFile

internal/config/config_test.go:855–870  ·  view source on GitHub ↗
(t *testing.T, data []byte)

Source from the content-addressed store, hash-verified

853}
854
855func createTempConfigFile(t *testing.T, data []byte) string {
856 t.Helper()
857
858 tempFile, err := os.CreateTemp("", "config.json")
859 require.NoError(t, err)
860
861 t.Cleanup(func() {
862 err := os.Remove(tempFile.Name())
863 require.NoError(t, err)
864 })
865
866 _, err = tempFile.Write(data)
867 require.NoError(t, err)
868
869 return tempFile.Name()
870}
871
872func assertConfigFileMatches(t *testing.T, actualConfigPath, expectedConfig string) {
873 t.Helper()

Callers 9

TestConfig_LoadFromDiskFunction · 0.85
TestConfig_GetTenantFunction · 0.85
TestConfig_AddTenantFunction · 0.85
TestConfig_RemoveTenantFunction · 0.85
TestConfig_ValidateFunction · 0.85

Calls 1

WriteMethod · 0.80

Tested by

no test coverage detected