MCPcopy Create free account
hub / github.com/github/gh-aw / TestActionsBuildCommand_NoActionsDir

Function TestActionsBuildCommand_NoActionsDir

pkg/cli/actions_build_command_test.go:14–28  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

12)
13
14func 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
30func TestActionsValidateCommand_NoActionsDir(t *testing.T) {
31 // Create a temporary directory without actions/

Callers

nothing calls this directly

Calls 2

ActionsBuildCommandFunction · 0.85
ErrorMethod · 0.45

Tested by

no test coverage detected