Skip to content

Commit 71785a5

Browse files
authored
acc: Remove GPARENT replacement (#3238)
It's only used in one test but it seems sometimes it just matches in unrelated cases. The use case for it is not super clear, so better not have it.
1 parent 66f9f69 commit 71785a5

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

acceptance/bundle/templates-machinery/wrong-url/output.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Error: git clone failed: git clone https://invalid-domain-123.databricks.com/hello/world [TEST_TMP_DIR]_GPARENT/world-123456 --no-tags --depth=1: exit status 128. Cloning into '[TEST_TMP_DIR]_GPARENT/world-123456'...
1+
Error: git clone failed: git clone https://invalid-domain-123.databricks.com/hello/world (redacted) --no-tags --depth=1: exit status 128. Cloning into '(redacted)'...
22
fatal: unable to access 'https://invalid-domain-123.databricks.com/hello/world/': Could not resolve host: invalid-domain-123.databricks.com
33

44

acceptance/bundle/templates-machinery/wrong-url/test.toml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,11 @@ New = '/'
55
[[Repls]]
66
Old = '/world-[0-9]+'
77
New = '/world-123456'
8+
9+
[[Repls]]
10+
Old = '''Cloning into '[^']+''''
11+
New = '''Cloning into '(redacted)''''
12+
13+
[[Repls]]
14+
Old = '''git clone https://invalid-domain-123.databricks.com/hello/world [^ ]+'''
15+
New = '''git clone https://invalid-domain-123.databricks.com/hello/world (redacted)'''

libs/testdiff/replacement.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,6 @@ func (r *ReplacementsContext) SetPathNoEval(old, new string) {
142142
func (r *ReplacementsContext) SetPathWithParents(old, new string) {
143143
r.SetPath(old, new)
144144
r.SetPath(filepath.Dir(old), new+"_PARENT")
145-
r.SetPath(filepath.Dir(filepath.Dir(old)), new+"_GPARENT")
146145
}
147146

148147
func PrepareReplacementsWorkspaceConfig(t testutil.TestingT, r *ReplacementsContext, cfg *config.Config) {

0 commit comments

Comments
 (0)