Chore: add example for env patch and fix e2e flaky (#2462)

This commit is contained in:
Jianbo Sun
2021-10-13 15:39:50 +08:00
committed by GitHub
parent c3eaa74ee7
commit f9ffb9e240
2 changed files with 28 additions and 1 deletions
+24
View File
@@ -0,0 +1,24 @@
apiVersion: core.oam.dev/v1beta1
kind: Application
metadata:
name: env-patch
spec:
components:
- name: express-server
properties:
cmd:
- node
- server.js
image: oamdev/testapp:v1
port: 8080
env:
- name: myenv1
value: myvalue1
- name: myenv2
value: myvalue2
traits:
- type: env
properties:
env:
myenv1: myvalue-trait-patched
type: webservice
+4 -1
View File
@@ -78,7 +78,10 @@ var _ = Describe("Test application controller clean up appRevision", func() {
appName := "app-1"
appKey := types.NamespacedName{Namespace: namespace, Name: appName}
app := getApp(appName, namespace, "normal-worker")
Expect(k8sClient.Create(ctx, app)).Should(BeNil())
Eventually(func() error {
err := k8sClient.Create(ctx, app)
return err
}, 15*time.Second, 300*time.Millisecond).Should(BeNil())
checkApp := new(v1beta1.Application)
for i := 0; i < appRevisionLimit; i++ {
Eventually(func() error {