From 76a0cce3ac8d6f406c39eca95101bc0cb6c4330f Mon Sep 17 00:00:00 2001 From: Duciwuci Date: Tue, 2 Sep 2025 14:37:30 +0200 Subject: [PATCH] adjust windows error message Signed-off-by: Duciwuci --- cmd/promtool/main_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/promtool/main_test.go b/cmd/promtool/main_test.go index 17acb5ad02..3f7cf5c166 100644 --- a/cmd/promtool/main_test.go +++ b/cmd/promtool/main_test.go @@ -298,7 +298,7 @@ func TestCheckConfigSyntax(t *testing.T) { err: "error checking client cert file \"testdata/nonexistent_cert_file.yml\": " + "stat testdata/nonexistent_cert_file.yml: no such file or directory", errWindows: "error checking client cert file \"testdata\\\\nonexistent_cert_file.yml\": " + - "CreateFile testdata\\nonexistent_cert_file.yml: The system cannot find the file specified.", + "GetFileAttributesEx testdata\\nonexistent_cert_file.yml: The system cannot find the file specified.", }, { name: "check with syntax only succeeds with nonexistent credentials file", @@ -314,7 +314,7 @@ func TestCheckConfigSyntax(t *testing.T) { err: "error checking authorization credentials or bearer token file \"/random/file/which/does/not/exist.yml\": " + "stat /random/file/which/does/not/exist.yml: no such file or directory", errWindows: "error checking authorization credentials or bearer token file \"testdata\\\\random\\\\file\\\\which\\\\does\\\\not\\\\exist.yml\": " + - "CreateFile testdata\\random\\file\\which\\does\\not\\exist.yml: The system cannot find the path specified.", + "GetFileAttributesEx testdata\\random\\file\\which\\does\\not\\exist.yml: The system cannot find the path specified.", }, } for _, test := range cases {