Skip to content
This repository has been archived by the owner on May 8, 2024. It is now read-only.

Commit

Permalink
Renamed executors
Browse files Browse the repository at this point in the history
  • Loading branch information
fkorotkov committed Apr 19, 2021
1 parent 92d1ac2 commit f82d56d
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions internal/executor/executor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,16 +64,16 @@ func TestPopulateCloneAndWorkingDirEnvironmentVariables(t *testing.T) {
}
tmpDirToRestore := os.Getenv("TMPDIR")
_ = os.Setenv("TMPDIR", "/tmp")
e := &Executor{}
ePreCreate := &Executor{}
ePreCreate.SetPreCreatedWorkingDir("/tmp/precreated-build")
executorDefault := &Executor{}
executorPreCreated := &Executor{}
executorPreCreated.SetPreCreatedWorkingDir("/tmp/precreated-build")
examples := []struct {
Executor *Executor
Description string
Given, Expected map[string]string
}{
{
e,
executorDefault,
"empty",
map[string]string{},
map[string]string{
Expand All @@ -82,7 +82,7 @@ func TestPopulateCloneAndWorkingDirEnvironmentVariables(t *testing.T) {
},
},
{
ePreCreate,
executorPreCreated,
"empty (precreated)",
map[string]string{},
map[string]string{
Expand All @@ -91,7 +91,7 @@ func TestPopulateCloneAndWorkingDirEnvironmentVariables(t *testing.T) {
},
},
{
e,
executorDefault,
"only working",
map[string]string{
"CIRRUS_WORKING_DIR": "/tmp/foo",
Expand All @@ -102,7 +102,7 @@ func TestPopulateCloneAndWorkingDirEnvironmentVariables(t *testing.T) {
},
},
{
ePreCreate,
executorPreCreated,
"only working (precreated)",
map[string]string{
"CIRRUS_WORKING_DIR": "/tmp/foo",
Expand All @@ -113,7 +113,7 @@ func TestPopulateCloneAndWorkingDirEnvironmentVariables(t *testing.T) {
},
},
{
e,
executorDefault,
"only working (monorepo)",
map[string]string{
"CIRRUS_WORKING_DIR": "$CIRRUS_CLONE_DIR/foo",
Expand All @@ -124,7 +124,7 @@ func TestPopulateCloneAndWorkingDirEnvironmentVariables(t *testing.T) {
},
},
{
ePreCreate,
executorPreCreated,
"only working (monorepo + precreated)",
map[string]string{
"CIRRUS_WORKING_DIR": "$CIRRUS_CLONE_DIR/foo",
Expand All @@ -135,7 +135,7 @@ func TestPopulateCloneAndWorkingDirEnvironmentVariables(t *testing.T) {
},
},
{
e,
executorDefault,
"only clone",
map[string]string{
"CIRRUS_CLONE_DIR": "/tmp/foo",
Expand All @@ -146,7 +146,7 @@ func TestPopulateCloneAndWorkingDirEnvironmentVariables(t *testing.T) {
},
},
{
ePreCreate,
executorPreCreated,
"only clone (precreated)",
map[string]string{
"CIRRUS_CLONE_DIR": "/tmp/foo",
Expand All @@ -157,7 +157,7 @@ func TestPopulateCloneAndWorkingDirEnvironmentVariables(t *testing.T) {
},
},
{
e,
executorDefault,
"both",
map[string]string{
"CIRRUS_CLONE_DIR": "/tmp/foo",
Expand All @@ -169,7 +169,7 @@ func TestPopulateCloneAndWorkingDirEnvironmentVariables(t *testing.T) {
},
},
{
ePreCreate,
executorPreCreated,
"both (precreated)",
map[string]string{
"CIRRUS_CLONE_DIR": "/tmp/foo",
Expand All @@ -181,7 +181,7 @@ func TestPopulateCloneAndWorkingDirEnvironmentVariables(t *testing.T) {
},
},
{
e,
executorDefault,
"both (monorepo)",
map[string]string{
"CIRRUS_CLONE_DIR": "/tmp/foo",
Expand All @@ -193,7 +193,7 @@ func TestPopulateCloneAndWorkingDirEnvironmentVariables(t *testing.T) {
},
},
{
ePreCreate,
executorPreCreated,
"both (monorepo + precreated)",
map[string]string{
"CIRRUS_CLONE_DIR": "/tmp/foo",
Expand Down

0 comments on commit f82d56d

Please sign in to comment.