(t *testing.T)
| 24 | } |
| 25 | |
| 26 | func 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 | |
| 46 | func TestDetectRuntimeFromCommand_GhAw(t *testing.T) { |
| 47 | originalVersion := GetVersion() |
nothing calls this directly
no test coverage detected