Skip to content

Commit 60beaea

Browse files
committed
chore: add comment about partial match in preset test
1 parent aff0832 commit 60beaea

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

provider/workspace_preset_test.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,9 @@ func TestWorkspacePreset(t *testing.T) {
157157
cache_invalidation {}
158158
}
159159
}`,
160+
// Note: Match only the beginning of the error message to make the test more reliable.
161+
// The full error message includes formatting differences like newlines, which could
162+
// cause the test to fail unnecessarily.
160163
ExpectError: regexp.MustCompile("The argument \"invalidate_after_secs\" is required,"),
161164
},
162165
{
@@ -209,7 +212,7 @@ func TestWorkspacePreset(t *testing.T) {
209212
for _, testcase := range testcases {
210213
t.Run(testcase.Name, func(t *testing.T) {
211214
t.Parallel()
212-
215+
213216
resource.Test(t, resource.TestCase{
214217
ProviderFactories: coderFactory(),
215218
IsUnitTest: true,

0 commit comments

Comments
 (0)