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

Function TestGetCodemods_DisablesRequestedCodemods

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

Source from the content-addressed store, hash-verified

128}
129
130func TestGetCodemods_DisablesRequestedCodemods(t *testing.T) {
131 codemods, err := GetCodemods([]string{"timeout-minutes-migration", "network-firewall-migration"})
132 require.NoError(t, err)
133
134 var ids []string
135 for _, codemod := range codemods {
136 ids = append(ids, codemod.ID)
137 }
138
139 assert.NotContains(t, ids, "timeout-minutes-migration")
140 assert.NotContains(t, ids, "network-firewall-migration")
141 assert.Contains(t, ids, "command-to-slash-command-migration")
142}
143
144func TestGetCodemods_UnknownDisabledCodemodReturnsError(t *testing.T) {
145 codemods, err := GetCodemods([]string{"not-a-real-codemod"})

Callers

nothing calls this directly

Calls 1

GetCodemodsFunction · 0.85

Tested by

no test coverage detected