chore: replace pre-installed standard-stateful with same as transient custom chart.
@@ -449,14 +449,48 @@ spec:
})
When("pushing as a stateful app", func() {
+ BeforeEach(func() {
+ // Create a custom chart referencing the tarball of the `standard-stateful` chart.
+ // It exists in the set of releases for helm charts.
+ // It is not distributed with epinio however.
+ // At this point in time we use it only internally, for testing.
+
+ chartName = catalog.NewTmpName("chart-")
+ tempFile = catalog.NewTmpName("chart-") + `.yaml`
+ err := os.WriteFile(tempFile, []byte(fmt.Sprintf(`apiVersion: application.epinio.io/v1
+kind: AppChart
+metadata:
+ namespace: epinio
+ name: %s
+ labels:
+ app.kubernetes.io/component: epinio
+ app.kubernetes.io/instance: default
+ app.kubernetes.io/name: epinio-standard-stateful-app-chart
+ app.kubernetes.io/part-of: epinio
+spec:
+ shortDescription: Epinio standard stateful deployment
+ description: Epinio standard support chart for stateful application deployment
+ helmChart: https://github.com/epinio/helm-charts/releases/download/epinio-application-stateful-0.1.21/epinio-application-stateful-0.1.21.tgz
+`, chartName)), 0600)
+ Expect(err).ToNot(HaveOccurred())
+
+ out, err := proc.Kubectl("apply", "-f", tempFile)
+ Expect(err).ToNot(HaveOccurred(), out)
+ })
+
AfterEach(func() {
env.DeleteApp(appName)
+
+ out, err := proc.Kubectl("delete", "-f", tempFile)
+ Expect(err).ToNot(HaveOccurred(), out)
+
+ os.Remove(tempFile)
})
It("pushes successfully", func() {
pushLog, err := env.EpinioPush("../assets/sample-app",
appName,
- "--app-chart", "standard-stateful",
+ "--app-chart", chartName,
"--name", appName)
Expect(err).ToNot(HaveOccurred(), pushLog)
