MCPcopy
hub / github.com/operator-framework/operator-sdk / readCSV

Function readCSV

test/integration/suite_test.go:169–179  ·  view source on GitHub ↗
(tc *testutils.TestContext, version string, isBundle bool)

Source from the content-addressed store, hash-verified

167}
168
169func readCSV(tc *testutils.TestContext, version string, isBundle bool) (*v1alpha1.ClusterServiceVersion, error) {
170 b, err := os.ReadFile(csvPath(tc, version, isBundle))
171 if err != nil {
172 return nil, err
173 }
174 csv := &v1alpha1.ClusterServiceVersion{}
175 if err := yaml.Unmarshal(b, csv); err != nil {
176 return nil, err
177 }
178 return csv, nil
179}
180
181func writeCSV(tc *testutils.TestContext, version string, csv *v1alpha1.ClusterServiceVersion, isBundle bool) error {
182 b, err := yaml.Marshal(csv)

Callers 1

suite_test.goFile · 0.85

Calls 1

csvPathFunction · 0.85

Tested by

no test coverage detected