(t *testing.T)
| 12 | ) |
| 13 | |
| 14 | func TestActionsBuildCommand_NoActionsDir(t *testing.T) { |
| 15 | // Create a temporary directory without actions/ |
| 16 | tmpDir := t.TempDir() |
| 17 | originalDir, err := os.Getwd() |
| 18 | require.NoError(t, err, "Failed to get current directory") |
| 19 | defer os.Chdir(originalDir) |
| 20 | |
| 21 | err = os.Chdir(tmpDir) |
| 22 | require.NoError(t, err, "Failed to change to temp directory") |
| 23 | |
| 24 | // Test with non-existent actions directory |
| 25 | err = ActionsBuildCommand() |
| 26 | require.Error(t, err, "Should error when actions/ directory does not exist") |
| 27 | assert.Contains(t, err.Error(), "actions/ directory does not exist", "Error should mention missing directory") |
| 28 | } |
| 29 | |
| 30 | func TestActionsValidateCommand_NoActionsDir(t *testing.T) { |
| 31 | // Create a temporary directory without actions/ |
nothing calls this directly
no test coverage detected