Skip to content

Commit 5b4a720

Browse files
committed
fix e2e test
1 parent 12ecf53 commit 5b4a720

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

internal/convert/adv2v2.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ func AdvancedClusterToV2(config []byte) ([]byte, error) {
2323
return nil, err
2424
}
2525
if updated {
26-
addConversionComments(block, true)
26+
addComments(block, true)
2727
}
2828
}
2929
return parser.Bytes(), nil

internal/convert/clu2adv.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ func ClusterToAdvancedCluster(config []byte, includeMoved bool) ([]byte, error)
4040
}
4141
convertedDataSource := convertDataSource(block)
4242
if convertedResource || convertedDataSource {
43-
addConversionComments(block, false)
43+
addComments(block, false)
4444
}
4545
}
4646
fillMovedBlocks(parserb, moveLabels)

internal/convert/shared.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ var (
1616
errDynamicBlockAlone = errors.New("dynamic block must be the only block, see docs for more information")
1717
)
1818

19-
// addConversionComments adds appropriate comments to a converted block
20-
func addConversionComments(block *hclwrite.Block, isUpdatedComment bool) {
19+
// addComments adds appropriate comments to a converted block
20+
func addComments(block *hclwrite.Block, isUpdatedComment bool) {
2121
blockb := block.Body()
2222
blockb.AppendNewline()
2323
if isUpdatedComment {

test/e2e/e2e_helper.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ import (
1414
func RunTF(args ...string) (string, error) {
1515
args = append([]string{"tf"}, args...)
1616
cmd := exec.CommandContext(context.Background(), "atlas", args...)
17+
// Silence the storage warning that appears in CI environments
18+
cmd.Env = append(os.Environ(), "ATLAS_SILENCE_STORAGE_WARNING=true")
1719
resp, err := cmd.CombinedOutput()
1820
return string(resp), err
1921
}

0 commit comments

Comments
 (0)