Skip to content

Commit fffe5bf

Browse files
committed
wip
1 parent ea34989 commit fffe5bf

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

internal/acctest/acctest.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ func NewTestTools(t *testing.T) *TestTools {
6464
}
6565

6666
/*
67-
Resources that depends on a projectID should use this function instead of NewTestTools
68-
It will use a specific matcher that strip the project_id from the query to match the query of the recorded cassette
67+
Tested resources that depends on a projectID in the query parameters should use this function
68+
Otherwise, tests will fail because the projectID will not match the ones in the recorded cassette queries
6969
*/
7070
func NewTestToolsWithoutDefaultProjectID(t *testing.T) *TestTools {
7171
t.Helper()

internal/services/billing/consumption_data_source_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ import (
1010
)
1111

1212
func TestAccDataSourceConsumption_Basic(t *testing.T) {
13-
tt := acctest.NewTestTools(t)
13+
// somehow the project_id is not set in the query parameters locally when the organization_id is set
14+
tt := acctest.NewTestToolsWithoutDefaultProjectID(t)
1415
defer tt.Cleanup()
1516

1617
resource.ParallelTest(t, resource.TestCase{

0 commit comments

Comments
 (0)