intellij-kubernetes
intellij-kubernetes copied to clipboard
"Push" notification should disappear if editor is empty
- No toolbar should be visible if if the editor is empty
- A toolbar/notification should be displayed if the editor contains at least:
apiVersion: ...
kind: ...
- An error should be displayed if there's more than the bare minimum (
apiVersion,kind) but the content is not valid k8s yaml/json
Steps:
- EXEC: create an empty yaml file and add
---
apiVersion: v1
kind: PersistentVolume
metadata:
annotations:
pv.kubernetes.io/bound-by-controller: "yes"
finalizers:
- kubernetes.io/pv-protection
labels:
volume: pv0001
name: pv0001
resourceVersion: "227035"
selfLink: /api/v1/persistentvolumes/pv0001
spec:
accessModes:
- ReadWriteOnce
capacity:
storage: 5Gi
claimRef:
apiVersion: v1
kind: PersistentVolumeClaim
name: myclaim
namespace: default
resourceVersion: "227033"
hostPath:
path: /mnt/pv-data/pv0001
type: ""
persistentVolumeReclaimPolicy: Recycle
volumeMode: Filesystem
status:
phase: Bound
- ASSERT: editor gets the toolbar and a notification to push the editor to the cluster in order to create the resource.
- EXEC: select all content and delete it
Result: The editor still displays the notification to push to the cluster. It should not, since there's no resource content any more.