Bug 1277038 - Should not show the resource is updated when using "oc env" to remove non-existing env for the resource
Summary: Should not show the resource is updated when using "oc env" to remove non-exi...
Keywords:
Status: CLOSED EOL
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: oc
Version: unspecified
Hardware: Unspecified
OS: Unspecified
medium
low
Target Milestone: ---
: ---
Assignee: Jakub Hadvig
QA Contact: Wei Sun
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-11-02 06:58 UTC by Xingxing Xia
Modified: 2020-02-26 19:12 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-02-26 19:12:27 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Xingxing Xia 2015-11-02 06:58:12 UTC
Description of problem:
If an environment variable is not already existing in the resource, then removing the variable from the resource should not show the resource is updated.

Version-Release number of selected component (if applicable):
openshift/oc v1.0.7-109-g3cf7f3c
kubernetes v1.2.0-alpha.1-1107-g4c8e6f4

How reproducible:
Always


Steps to Reproduce:
1. oc login, create project
2. create app
$ oc new-app -f origin/examples/sample-app/application-template-stibuild.json
3. Add env variable and then remove it
$ oc env dc/database ENV1=VAL1
deploymentconfig "database" updated
$ oc deploy database
database #2 deployment running for 9 seconds
database #1 deployed about a minute ago - 1 pod
$ oc env dc/database ENV1-
deploymentconfig "database" updated
$ oc deploy database
database #3 deployment running for 6 seconds
database #2 deployed about  minute ago - 1 pod
4. Just remove an env variable that is not existing
$ oc env dc/database NOTEXIST-
deploymentconfig "database" updated
$ oc deploy database
database #3 deployed 2 minutes ago - 1 pod

Actual results:
4. Show the resource is updated

Expected results:
4. Should not show the resource is updated. Instead, it should give some prompt such as: the env variable does not exist. Otherwise, it gives misleading message.


Additional info:


Note You need to log in before you can comment on or make changes to this bug.