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

Function TestRuntimesConfigToMap_GhAw

pkg/workflow/runtime_gh_aw_test.go:26–44  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

24}
25
26func TestRuntimesConfigToMap_GhAw(t *testing.T) {
27 result := runtimesConfigToMap(&RuntimesConfig{
28 GhAw: &RuntimeConfig{
29 Version: "v1.2.3",
30 If: "github.event_name == 'push'",
31 ActionRepo: "github/gh-aw-actions/setup-cli",
32 ActionVersion: "v0.72.1",
33 },
34 })
35
36 ghAwRaw, ok := result["gh-aw"]
37 require.True(t, ok)
38 ghAw, ok := ghAwRaw.(map[string]any)
39 require.True(t, ok)
40 assert.Equal(t, "v1.2.3", ghAw["version"])
41 assert.Equal(t, "github.event_name == 'push'", ghAw["if"])
42 assert.Equal(t, "github/gh-aw-actions/setup-cli", ghAw["action-repo"])
43 assert.Equal(t, "v0.72.1", ghAw["action-version"])
44}
45
46func TestDetectRuntimeFromCommand_GhAw(t *testing.T) {
47 originalVersion := GetVersion()

Callers

nothing calls this directly

Calls 1

runtimesConfigToMapFunction · 0.85

Tested by

no test coverage detected