MCPcopy
hub / github.com/helm/helm / TestInstallCRDs

Function TestInstallCRDs

pkg/action/install_test.go:1135–1149  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

1133}
1134
1135func TestInstallCRDs(t *testing.T) {
1136 config := actionConfigFixtureWithDummyResources(t, createDummyCRDList(false))
1137 instAction := NewInstall(config)
1138
1139 mockFile := common.File{
1140 Name: "crds/foo.yaml",
1141 Data: []byte("hello"),
1142 }
1143 mockChart := buildChart(withFile(mockFile))
1144 crdsToInstall := mockChart.CRDObjects()
1145
1146 assert.Len(t, crdsToInstall, 1)
1147 assert.Equal(t, crdsToInstall[0].File.Data, mockFile.Data)
1148 require.NoError(t, instAction.installCRDs(crdsToInstall))
1149}
1150
1151func TestInstallCRDs_AlreadyExist(t *testing.T) {
1152 dummyResources := createDummyCRDList(false)

Callers

nothing calls this directly

Calls 8

installCRDsMethod · 0.95
createDummyCRDListFunction · 0.85
NewInstallFunction · 0.85
buildChartFunction · 0.85
withFileFunction · 0.85
CRDObjectsMethod · 0.45
LenMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…