MCPcopy Create free account
hub / github.com/apache/dubbo-go / writeFile

Function writeFile

loader_test.go:26–33  ·  view source on GitHub ↗
(t *testing.T, dir, name, content string)

Source from the content-addressed store, hash-verified

24)
25
26func writeFile(t *testing.T, dir, name, content string) string {
27 t.Helper()
28 p := filepath.Join(dir, name)
29 if err := os.WriteFile(p, []byte(content), 0o600); err != nil {
30 t.Fatalf("write file: %v", err)
31 }
32 return p
33}
34
35func TestHotUpdateConfig_AllowsLoggerLevelChange(t *testing.T) {
36 // snapshot globals we touch and restore afterwards

Calls 2

JoinMethod · 0.65
FatalfMethod · 0.65

Tested by

no test coverage detected