Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #17457 from mjudeikis/bugzilla_1470374
Automatic merge from submit-queue (batch tested with PRs 17539, 17457). bug 1470374 - oc new-app behaviour oc new-app `oc import-image openshift/ruby-20-centos7:latest --confirm -n openshift` ### Syntax 1. Case 1. Git: True. URL: Remote. RESULT: All components created. Source build type. EXPECTATION: OK `oc new-app openshift/ruby-20-centos7:latest~https://github.com/openshift/ruby-hello-world.git` ### Syntax 1. Case 2. Git: False. URL: Remote. RESULT: All components created. Source build type. EXPECTATION: OK `oc new-app openshift/ruby-20-centos7:latest~https://github.com/openshift/ruby-hello-world.git` ``` -bash-4.4# oc new-app openshift/ruby-20-centos7:latest~https://github.com/openshift/ruby-hello-world.git warning: Cannot find git. Ensure that it is installed and in your path. Git is required to work with git repositories. .... ``` ### Syntax 1. Case 3. GIT: False. URL: HostPath. RESULT: All components created. BINARY build type. EXPECTATION: ok `oc new-app openshift/ruby-20-centos7:latest~/root/app-examples/ruby` ``` warning: Cannot find git. Ensure that it is installed and in your path. Git is required to work with git repositories. ... ``` ### Syntax 1. Case 4. Git: True. URL: HostDir. RESULT: (?TBC?) EXPECTATION: Check if hostDir is valid git - Source. Else - Binary. `oc new-app openshift/ruby-20-centos7:latest~/root/app-examples/ruby` ### Syntax 2. Case 1. GIT: True. URL: Remote. RESULT: All components created. Source build type. EXPECTATION: OK `oc new-app -i ruby-20-centos7:latest https://github.com/openshift/ruby-hello-world.git` ### Syntax 2. Case 2. GIT: False. URL: Remote RESULT: No components created. We cant investigate remote repo. EXPECTATION: Create all components same as `Syntax 1. Case 2` `oc new-app -i ruby-20-centos7:latest https://github.com/openshift/ruby-hello-world.git` ``` warning: Cannot find git. Ensure that it is installed and in your path. Git is required to work with git repositories. error: git binary not available ``` ### Syntax 2. Case 3. GIT: False. URL: HostPath. RESULT: All components created. BINARY build type. EXPECTATION: ok `oc new-app -i ruby-20-centos7:latest /root/app-examples/ruby` ### Syntax 2. Case 4. GIT: True. URL: HostPath. RESULT: (?TBC?) EXPECTATION: Check if hostDir is valid git - Source. Else - Binary. `oc new-app -i ruby-20-centos7:latest /root/app-examples/ruby` ### Sytnax 3. Case 1. GIT: True. URL: Remote. RESULT: All components created. Source build type. EXPECTATION: ok `oc new-app -i ruby-20-centos7:latest --code https://github.com/openshift/ruby-hello-world.git` ### Sytnax 3. Case 2. GIT: False. URL: Remote. RESULT: All components created. Source build type. EXPECTATION: ok `oc new-app -i ruby-20-centos7:latest --code https://github.com/openshift/ruby-hello-world.git` ### Sytnax 3. Case 3. GIT: False. URL: HostPath. RESULT: All components created. Binary build type. EXPECTATION: ok `oc new-app -i ruby-20-centos7:latest --code /root/app-examples/ruby` ### Sytnax 3. Case 4. GIT: True. URL: HostPath. RESULT: (?TBC?) EXPECTATION: If hostDir - git repo - Source build. Else Binary build. `oc new-app -i ruby-20-centos7:latest --code /root/app-examples/ruby` TODO: - add tests to cover this case https://bugzilla.redhat.com/show_bug.cgi?id=1470374
- Loading branch information