Skip to content

Commit

Permalink
add env var for PluginCacheMayBreakDependencyLockFile
Browse files Browse the repository at this point in the history
  • Loading branch information
smonero committed Jun 14, 2024
1 parent 156e889 commit 204afc9
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion server/neptune/workflows/activities/terraform_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@ package activities
import (
"context"
"fmt"
"github.com/runatlantis/atlantis/server/neptune/workflows/activities/command"
"strings"
"sync"
"testing"

"github.com/runatlantis/atlantis/server/neptune/workflows/activities/command"

"github.com/hashicorp/go-version"
"github.com/runatlantis/atlantis/server/neptune/workflows/activities/file"
"github.com/runatlantis/atlantis/server/neptune/workflows/activities/terraform"
Expand Down Expand Up @@ -133,6 +134,7 @@ func TestTerraformInit_RequestValidation(t *testing.T) {
"DIR": "some/path",
"TF_IN_AUTOMATION": "true",
"TF_PLUGIN_CACHE_DIR": "some/dir",
"TF_PLUGIN_CACHE_MAY_BREAK_DEPENDENCY_LOCK_FILE": "true",
},
},
{
Expand All @@ -157,6 +159,7 @@ func TestTerraformInit_RequestValidation(t *testing.T) {
"DIR": "some/path",
"TF_IN_AUTOMATION": "true",
"TF_PLUGIN_CACHE_DIR": "some/dir",
"TF_PLUGIN_CACHE_MAY_BREAK_DEPENDENCY_LOCK_FILE": "true",
},
},
{
Expand All @@ -173,6 +176,7 @@ func TestTerraformInit_RequestValidation(t *testing.T) {
"DIR": "some/path",
"TF_IN_AUTOMATION": "true",
"TF_PLUGIN_CACHE_DIR": "some/dir",
"TF_PLUGIN_CACHE_MAY_BREAK_DEPENDENCY_LOCK_FILE": "true",
},

// defaults
Expand Down Expand Up @@ -267,6 +271,7 @@ func TestTerraformInit_StreamsOutput(t *testing.T) {
"DIR": "some/path",
"TF_IN_AUTOMATION": "true",
"TF_PLUGIN_CACHE_DIR": "some/dir",
"TF_PLUGIN_CACHE_MAY_BREAK_DEPENDENCY_LOCK_FILE": "true",
},
version: expectedVersion,
resp: expectedMsgStr,
Expand Down Expand Up @@ -337,6 +342,7 @@ func TestTerraformPlan_RequestValidation(t *testing.T) {
"DIR": "some/path",
"TF_IN_AUTOMATION": "true",
"TF_PLUGIN_CACHE_DIR": "some/dir",
"TF_PLUGIN_CACHE_MAY_BREAK_DEPENDENCY_LOCK_FILE": "true",
},
},
{
Expand Down Expand Up @@ -367,6 +373,7 @@ func TestTerraformPlan_RequestValidation(t *testing.T) {
"DIR": "some/path",
"TF_IN_AUTOMATION": "true",
"TF_PLUGIN_CACHE_DIR": "some/dir",
"TF_PLUGIN_CACHE_MAY_BREAK_DEPENDENCY_LOCK_FILE": "true",
},
},
{
Expand All @@ -387,6 +394,7 @@ func TestTerraformPlan_RequestValidation(t *testing.T) {
"DIR": "some/path",
"TF_IN_AUTOMATION": "true",
"TF_PLUGIN_CACHE_DIR": "some/dir",
"TF_PLUGIN_CACHE_MAY_BREAK_DEPENDENCY_LOCK_FILE": "true",
},
},
{
Expand All @@ -404,6 +412,7 @@ func TestTerraformPlan_RequestValidation(t *testing.T) {
"DIR": "some/path",
"TF_IN_AUTOMATION": "true",
"TF_PLUGIN_CACHE_DIR": "some/dir",
"TF_PLUGIN_CACHE_MAY_BREAK_DEPENDENCY_LOCK_FILE": "true",
},

// default
Expand Down Expand Up @@ -512,6 +521,7 @@ func TestTerraformPlan_ReturnsResponse(t *testing.T) {
"DIR": "some/path",
"TF_IN_AUTOMATION": "true",
"TF_PLUGIN_CACHE_DIR": "some/dir",
"TF_PLUGIN_CACHE_MAY_BREAK_DEPENDENCY_LOCK_FILE": "true",
},
version: expectedVersion,
resp: expectedMsgStr,
Expand All @@ -526,6 +536,7 @@ func TestTerraformPlan_ReturnsResponse(t *testing.T) {
"DIR": "some/path",
"TF_IN_AUTOMATION": "true",
"TF_PLUGIN_CACHE_DIR": "some/dir",
"TF_PLUGIN_CACHE_MAY_BREAK_DEPENDENCY_LOCK_FILE": "true",
},
version: expectedVersion,
resp: "{\"format_version\": \"1.0\",\"resource_changes\":[{\"change\":{\"actions\":[\"update\"]},\"address\":\"type.resource\"}]}",
Expand Down Expand Up @@ -602,6 +613,7 @@ func TestTerraformApply_RequestValidation(t *testing.T) {
"DIR": "some/path",
"TF_IN_AUTOMATION": "true",
"TF_PLUGIN_CACHE_DIR": "some/dir",
"TF_PLUGIN_CACHE_MAY_BREAK_DEPENDENCY_LOCK_FILE": "true",
},
},
{
Expand All @@ -624,6 +636,7 @@ func TestTerraformApply_RequestValidation(t *testing.T) {
"DIR": "some/path",
"TF_IN_AUTOMATION": "true",
"TF_PLUGIN_CACHE_DIR": "some/dir",
"TF_PLUGIN_CACHE_MAY_BREAK_DEPENDENCY_LOCK_FILE": "true",
},
},
{
Expand Down

0 comments on commit 204afc9

Please sign in to comment.