MCPcopy
hub / github.com/zalando/skipper / createRoutesFile

Function createRoutesFile

skipper_test.go:495–509  ·  view source on GitHub ↗
(route string)

Source from the content-addressed store, hash-verified

493}
494
495func createRoutesFile(route string) (string, error) {
496 fd, err := os.CreateTemp("/tmp", "test_data_clients_")
497 if err != nil {
498 return "", fmt.Errorf("Failed to create tempfile: %w", err)
499 }
500 _, err = fd.WriteString(route)
501 if err != nil {
502 return "", fmt.Errorf("Failed to write tempfile: %w", err)
503 }
504
505 filePath := fd.Name()
506 err = fd.Close()
507
508 return filePath, err
509}
510
511func TestDataClients(t *testing.T) {
512 t.Run("all dataclients work as expected", func(t *testing.T) {

Callers 1

TestDataClientsFunction · 0.85

Calls 4

ErrorfMethod · 0.65
WriteStringMethod · 0.65
NameMethod · 0.65
CloseMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…