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

Function TestGetActionDirectories_SortedOutput

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

Source from the content-addressed store, hash-verified

129}
130
131func TestGetActionDirectories_SortedOutput(t *testing.T) {
132 tmpDir := t.TempDir()
133 actionsDir := filepath.Join(tmpDir, "actions")
134 // Create directories in reverse-alphabetical order to verify sorting
135 for _, name := range []string{"zebra", "alpha", "middle"} {
136 require.NoError(t, os.MkdirAll(filepath.Join(actionsDir, name), 0755), "failed to create dir")
137 }
138
139 dirs, err := getActionDirectories(actionsDir)
140 require.NoError(t, err, "should not error with valid actions directory")
141 assert.Equal(t, []string{"alpha", "middle", "zebra"}, dirs, "directories should be sorted alphabetically")
142}
143
144func TestValidateActionYml(t *testing.T) {
145 tests := []struct {

Callers

nothing calls this directly

Calls 1

getActionDirectoriesFunction · 0.85

Tested by

no test coverage detected