From 4d951237757e2680d0dc1b11654ed40e4fe6cd11 Mon Sep 17 00:00:00 2001 From: Charlie Egan Date: Mon, 7 Oct 2024 09:46:58 +0100 Subject: [PATCH] Correct test error message Signed-off-by: Charlie Egan --- internal/lsp/server_template_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/lsp/server_template_test.go b/internal/lsp/server_template_test.go index 994cc452..17969094 100644 --- a/internal/lsp/server_template_test.go +++ b/internal/lsp/server_template_test.go @@ -127,7 +127,7 @@ func TestTemplateContentsForFileInWorkspaceRoot(t *testing.T) { err = os.WriteFile(filepath.Join(td, ".regal/config.yaml"), []byte{}, 0o600) if err != nil { - t.Fatalf("failed to create directory %s: %s", filepath.Join(td, ".regal"), err) + t.Fatalf("failed to create file %s: %s", filepath.Join(td, ".regal"), err) } ctx := context.Background() @@ -145,7 +145,7 @@ func TestTemplateContentsForFileInWorkspaceRoot(t *testing.T) { } if !strings.Contains(err.Error(), "this function does not template files in the workspace root") { - t.Fatalf("expected error to be templatingInRootError, got %T", err) + t.Fatalf("expected error about root templating, got %s", err.Error()) } }