-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: with override for golang actions (#205)
* feat: with override for golang actions Signed-off-by: Kasper J. Hermansen <[email protected]> * feat: with docs Signed-off-by: Kasper J. Hermansen <[email protected]> * feat: with tests Signed-off-by: Kasper J. Hermansen <[email protected]> --------- Signed-off-by: Kasper J. Hermansen <[email protected]>
- Loading branch information
Showing
6 changed files
with
106 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package executer | ||
|
||
import ( | ||
"testing" | ||
|
||
"github.com/stretchr/testify/assert" | ||
) | ||
|
||
func TestIsActionsEnabled(t *testing.T) { | ||
t.Run("default is enabled", func(t *testing.T) { | ||
t.Setenv("SHUTTLE_GOLANG_ACTIONS", "") | ||
|
||
assert.True(t, isActionsEnabled()) | ||
}) | ||
|
||
t.Run("set false is not enabled", func(t *testing.T) { | ||
t.Setenv("SHUTTLE_GOLANG_ACTIONS", "false") | ||
|
||
assert.False(t, isActionsEnabled()) | ||
}) | ||
|
||
t.Run("set true is enabled", func(t *testing.T) { | ||
t.Setenv("SHUTTLE_GOLANG_ACTIONS", "true") | ||
|
||
assert.True(t, isActionsEnabled()) | ||
}) | ||
|
||
t.Run("set any other value is enabled", func(t *testing.T) { | ||
t.Setenv("SHUTTLE_GOLANG_ACTIONS", "blabla") | ||
|
||
assert.True(t, isActionsEnabled()) | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters