Skip to content

Commit 85e9ce9

Browse files
committed
Adjust timeout for e2e test and minor revisions
1 parent 3149f12 commit 85e9ce9

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

tests/e2e/unified_test.go

+12-6
Original file line numberDiff line numberDiff line change
@@ -999,14 +999,20 @@ func configureVCR(t *testing.T, h *create.Harness) {
999999
result = strings.Replace(result, os.Getenv("TEST_ORG_ID"), "123450001", -1)
10001000
}
10011001

1002-
// Replace user info
1003-
obj := make(map[string]any)
1004-
if err := json.Unmarshal([]byte(s), &obj); err == nil {
1005-
toReplace, _, _ := unstructured.NestedString(obj, "user")
1006-
if len(toReplace) != 0 {
1007-
result = strings.Replace(result, toReplace, "[email protected]", -1)
1002+
addReplacement := func(path string, newValue string) {
1003+
tokens := strings.Split(path, ".")
1004+
obj := make(map[string]any)
1005+
if err := json.Unmarshal([]byte(s), &obj); err == nil {
1006+
toReplace, found, _ := unstructured.NestedString(obj, tokens...)
1007+
if found {
1008+
result = strings.Replace(result, toReplace, newValue, -1)
1009+
}
10081010
}
10091011
}
1012+
// Replace user info
1013+
addReplacement("user", "[email protected]")
1014+
// Replace billing account name
1015+
addReplacement("billingAccountName", "billingAccounts/123456-777777-000001")
10101016
return result
10111017
}
10121018

0 commit comments

Comments
 (0)