Skip to content

Commit

Permalink
Merge pull request #158 from grafana/fix-translate-test
Browse files Browse the repository at this point in the history
thema: Fix undesired variable shadow on Instance.Translate test
  • Loading branch information
sam boyer committed May 18, 2023
2 parents b572cba + 8f46d68 commit b3fb56d
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions instance_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,17 @@ func TestInstance_Translate(t *testing.T) {
lin, lerr := bindTxtarLineage(tc, rt)
require.NoError(tc, lerr)

for sch := lin.First(); sch != nil; sch = sch.Successor() {
for _, example := range sch.Examples() {
for sch := lin.First(); sch != nil; sch = sch.Successor() {
to := sch.Version()
tinst, lacunas := example.Translate(to)
for from := lin.First(); from != nil; from = from.Successor() {
for _, example := range from.Examples() {
for to := lin.First(); to != nil; to = to.Successor() {
tinst, lacunas := example.Translate(to.Version())
require.NotNil(t, tinst)

result := tinst.Underlying()
require.True(t, result.Exists())
require.NoError(t, result.Err())

writeGolden(tc, to, example, result, lacunas)
writeGolden(tc, to.Version(), example, result, lacunas)
}
}
}
Expand Down

0 comments on commit b3fb56d

Please sign in to comment.