Commit Graph

163 Commits

Author SHA1 Message Date
Mohammed Ahmed
0b8b712a99 Dropping support for service catalog based services (#4906)
* Removing cli layer and integration tests related to service catalog

Signed-off-by: Mohammed Zeeshan Ahmed <mohammed.zee1000@gmail.com>

* Fixing missing error msg

Signed-off-by: Mohammed Zeeshan Ahmed <mohammed.zee1000@gmail.com>

* Fixing golint errors

Signed-off-by: Mohammed Zeeshan Ahmed <mohammed.zee1000@gmail.com>

* Fixing error for interactive mode

Signed-off-by: Mohammed Zeeshan Ahmed <mohammed.zee1000@gmail.com>

* Moving interactive mode error to top

Signed-off-by: Mohammed Zeeshan Ahmed <mohammed.zee1000@gmail.com>

* Fixing

Signed-off-by: Mohammed Zeeshan Ahmed <mohammed.zee1000@gmail.com>

* Fixing interactive mode error condition

Signed-off-by: Mohammed Zeeshan Ahmed <mohammed.zee1000@gmail.com>

* Removing some more service related code

Signed-off-by: Mohammed Zeeshan Ahmed <mohammed.zee1000@gmail.com>

* Fixing golint

Signed-off-by: Mohammed Zeeshan Ahmed <mohammed.zee1000@gmail.com>

* Removing service catalog backend part 1

Signed-off-by: Mohammed Zeeshan Ahmed <mohammed.zee1000@gmail.com>

* Updating changelogs

Signed-off-by: Mohammed Zeeshan Ahmed <mohammed.zee1000@gmail.com>

* Removing some more of the service catalog related code

Signed-off-by: Mohammed Zeeshan Ahmed <mohammed.zee1000@gmail.com>

* Updating as per comments in review

Signed-off-by: Mohammed Zeeshan Ahmed <mohammed.zee1000@gmail.com>

* Update pkg/odo/cli/service/create.go

Co-authored-by: Parthvi Vala <pvala@redhat.com>

* Fixing gofmt

Signed-off-by: Mohammed Zeeshan Ahmed <mohammed.zee1000@gmail.com>

* Adding kube to cli docs

Signed-off-by: Mohammed Zeeshan Ahmed <mohammed.zee1000@gmail.com>

* Updating changelog as per comments by @dharmit

Signed-off-by: Mohammed Zeeshan Ahmed <mohammed.zee1000@gmail.com>

* Removing some unnessasary stuff

Signed-off-by: Mohammed Zeeshan Ahmed <mohammed.zee1000@gmail.com>

* Updating docs based changes as per review

Signed-off-by: Mohammed Zeeshan Ahmed <mohammed.zee1000@gmail.com>

* Fixing test

Signed-off-by: Mohammed Zeeshan Ahmed <mohammed.zee1000@gmail.com>

* Update pkg/odo/cli/catalog/describe/service.go

Co-authored-by: Philippe Martin <contact@elol.fr>

* Update pkg/odo/cli/service/list.go

Co-authored-by: Philippe Martin <contact@elol.fr>

Co-authored-by: Parthvi Vala <pvala@redhat.com>
Co-authored-by: Philippe Martin <contact@elol.fr>
2021-08-18 11:41:43 +00:00
Mrinal Das
6b03998f5b Adds a column in odo list output to indicate components created by odo (#4962)
* Adds a column in odo list output to indicate components created by odo

* Updates the changelog.md
2021-08-05 08:40:57 +00:00
Philippe Martin
0fd7a11129 Refactor project command tests (#4849) 2021-07-02 03:14:33 -04:00
Philippe Martin
843e520f6b odo link and odo unlink write to devfile without deploying to cluster (#4819)
* Do not deploy sbr at `odo link` time, save it in devfile

* Changelog

* Fix remove duplicates

* Do not set owner references again

* Fix wait for pod terminating

* Simplify env vars deduplication

* Add comment

* Dont use oc

* link type

* fix

* Fix spinner

* Fix tests

* Fic error message for link/unlink

* Review

* No spinner
2021-07-01 06:43:24 -04:00
Philippe Martin
648592e93a Run operator hub tests in parallel (#4846) 2021-06-24 06:16:05 -04:00
Philippe Martin
73d3b5b955 Set 4 nodes for ginkgo tests (#4811) 2021-06-23 07:15:55 -04:00
Philippe Martin
ec282f8855 Run ginkgo with GOFLAGS="-mod=vendor" to make ginkgo build the tests in vendor mode (#4787) 2021-06-11 10:38:16 -04:00
Tomas Kral
7b44d593e4 use -mod=vendor with all go commands in Makefile and use vendoring to manage ginkgo (#4784)
* export GOFLAGS=-mod=vendor in Makefile

* use go get instead of go install

for installing test dependencies

* use tools approach to manage testing dependencies

When using this apporoach we can make sure that all dependencies in a
proper version are vendored with the source code.

* go mod vendor

* add wwhrd expection for github.com/hinshun/vt10x
2021-06-09 11:18:51 +02:00
Philippe Martin
353785713c Add make help (#4695)
* Add make help

* Update Makefile

Co-authored-by: Dharmit Shah <shahdharmit@gmail.com>

* Update Makefile

Co-authored-by: Dharmit Shah <shahdharmit@gmail.com>

* Update Makefile

Co-authored-by: Dharmit Shah <shahdharmit@gmail.com>

Co-authored-by: Dharmit Shah <shahdharmit@gmail.com>
2021-05-06 06:44:19 -04:00
Anand Kumar Singh
9848769234 Automate psi ci for mac and windows (#4460)
* adding setup script and e2e-intigration,unit test script

Signed-off-by: anandrkskd <anandrkskd@gmail.com>

* adding mac and windows jobs

Signed-off-by: anandrkskd <anandrkskd@gmail.com>

* fixing typo

Signed-off-by: anandrkskd <anandrkskd@gmail.com>

* Consolidating scripts

Signed-off-by: anandrkskd <anandrkskd@gmail.com>

* fixing unit test for windows and typo

Signed-off-by: anandrkskd <anandrkskd@gmail.com>

* Fixing tests for windows and mac

Signed-off-by: anandrkskd <anandrkskd@gmail.com>

* Fixing  mac unit test go not found

Signed-off-by: anandrkskd <anandrkskd@gmail.com>

* Fixing  unit tests on windows mac

Signed-off-by: anandrkskd <anandrkskd@gmail.com>

* Fixing  unit tests on windows

Signed-off-by: anandrkskd <anandrkskd@gmail.com>

* Fixing  unit tests on windows

Signed-off-by: anandrkskd <anandrkskd@gmail.com>

* adding exchange for PSI tests

Signed-off-by: anandrkskd <anandrkskd@gmail.com>

* adding exchange for PSI tests

Signed-off-by: anandrkskd <anandrkskd@gmail.com>

* fixing typo

Signed-off-by: anandrkskd <anandrkskd@gmail.com>

* fixing unit test

Signed-off-by: anandrkskd <anandrkskd@gmail.com>

* fix unit test using cache

Signed-off-by: anandrkskd <anandrkskd@gmail.com>

* rebase

Signed-off-by: anandrkskd <anandrkskd@gmail.com>

* increase oc download time

Signed-off-by: anandrkskd <anandrkskd@gmail.com>

* windows unit test fix & fix for oc on mac

Signed-off-by: anandrkskd <anandrkskd@gmail.com>

* windows unit test

Signed-off-by: anandrkskd <anandrkskd@gmail.com>

* remove e2e test from this PR

Signed-off-by: anandrkskd <anandrkskd@gmail.com>

* increase timeout for test & change ci-firewall version

Signed-off-by: anandrkskd <anandrkskd@gmail.com>
2021-05-05 03:14:15 -04:00
Girish Ramnani
0307191508 implement devfile conversion ( with --now support) on --s2i without --git flag (#4518)
* implement devfile conversion ( with --now support) on --s2i without --git flag

* fix unit tests

* resolve failing tests

* small fix

* more test fixes

* more failing tests

* fix multiple tests

* forgot to push

* fix debug port error

* fix failures

* resolve no ports error

* more test fixes

* fixing more failures in tests

* fix more tests

* small fix

* changes

* update more tests

* fix more tests

* more tests

* fix more tests

* more test resolved

* add comment on test

* remove and updated tests

* fixed more tests

* removed FIt

* Removed FIt

* fix tests

* fix unit test

* fix more tests

* more tests fixed

* fix some e2e tests

* commented some tests

* add images back

* change --git links

* more images

* comment

* fix comments

* fix e2e images test

* address tests

* add requested test and helpers

* more cleanup

* remove dependence on kubectl

* use different port

Co-authored-by: Tomas Kral <tkral@redhat.com>
2021-04-20 12:13:12 -04:00
Mohammed Ahmed
6027c7eb3c Updating segment variable= dev key as default overrideable with ldflags (#4585)
* Updating segment varialbe= dev key as default overrideable with ldflags

Signed-off-by: Mohammed Zeeshan Ahmed <mohammed.zee1000@gmail.com>

* Changing const to var

Signed-off-by: Mohammed Zeeshan Ahmed <mohammed.zee1000@gmail.com>
2021-04-05 14:12:13 +02:00
Girish Ramnani
5e943225dc removal of docker tests and related helper code (#4521) 2021-03-17 07:07:00 -07:00
rnapoles-rh
9200a7f99c #3377 adding odo devfile support test (#4179)
* #3377 adding odo devfile support test

* #3377 replaced spaces with a Tab

* #3377 updated focus value

* #3377 addressed all Priti's comments in PR

* #3377 addressed additional comments from Priti's comments in PR

* #3377 adding make test-e2e-devfile
2020-11-20 01:13:14 +01:00
Anand Kumar Singh
aa4c528ff2 Enable link unlink target for 311 servicecatalog test (#3969) 2020-10-31 05:17:03 +01:00
Jonathan West
391e124b46 Status support: Event notification support for build and application status for IDE integration for devfile scenarios (#3431)
* Status support: Event notification support for build and application status for IDE integration for devfile scenarios

* Status support: Event notification support for build and application status for IDE integration for devfile scenarios

* Status support: Event notification support for build and application status for IDE integration for devfile scenarios

* Status support: Event notification support for build and application status for IDE integration for devfile scenarios

* Status support: Event notification support for build and application status for IDE integration for devfile scenarios

* Status support: Event notification support for build and application status for IDE integration for devfile scenarios

* Status support: Event notification support for build and application status for IDE integration for devfile scenarios

* Rebase

* Rebase

* Respond to review comments

* Make gofmt happy

* Add podwatcher unit tests

* Fix go vet

* Fix linter issues

* Rebase

* Fix unit test

* Fix unit test

* Fix unit test

* Respond to review comments

* Make linter happy

* Rebase

* Use latest URL APIs

* Response to API changes

* Fix rebase artifacts

* Fix rebase artifacts

* Respond to API changes

* Remove experimental flag

* Rebase to latest
2020-10-23 18:15:37 -04:00
Mrinal Das
b1245a5337 Adds app commands for devfile components (#4007)
* Adds app commands for devfile components

* Fixes log messages and comments

* Fixes s2i app test script

* Fixes s2i local config components

* Removes devfile test for help

* Adds unit test cases for List()

* Updates integration tests

* Fixed alias in import
2020-10-12 08:36:00 -04:00
John Collier
c3dc721a81 Update vendor-update makefile target (#4086)
Signed-off-by: John Collier <jcollier@redhat.com>
2020-10-06 15:44:28 -04:00
Chris Laprun
442d40991f implement odo describe for devfile (#3843)
* feat: add GetName and GetNamespace methods to LocalConfigProvider

* refactor: remove redundant resolveProject

This is accomplished by making resolveNamespace take a
LocalConfigProvider instance instead of LocalConfigInfo.
Also record the project/namespace when creating a devfile context.

* refactor: rename and improve resolveComponent, set component on devfile

Renamed to resolveAndSetComponent making it an internalContext method,
taking a LocalConfigProvider instead of LocalConfigInfo. Also now set
the resolved component on the receiver context.

* fix: make describe Complete work with devfiles, simplify

* refactor: make LocalConfigInfo.GetURL return EnvInfoURL

* fix: typo

* feat: add GetDebugPort and GetURL to LocalConfigProvider

* refactor: rename ConfigFileExists & EnvInfoFileExists to Exists

* feat: add Exists method to LocalConfigProvider

* feat: add GetEnv method to LocalConfigProvider & implementations

* fix: revert adding GetEnv because it introduces import cycle

It's impossible to parse a devfile within the envinfo package because
the parser package now depends on the config package which I think it
shouldn't depend on. :(

* feat: first implementation supporting describe for devfiles

* fix: error format

* fix: break from loop as soon as project is found

* fix: properly set namespace of clients

* fix: handle error

* refactor: use map, initialized only once and not per call

* fix: use oc client if k8s client failed

* fix: typos

* fix: allow creating components with invalid namespaces

Not sure why this should be working but that's what the tests say…

* fix: revert resolveProject function

Seems like having a single function to resolve the namespace should be
enough but it gets too complicated too quickly and cleaning up this
mess is not the goal of this PR anyway… :sad:

* fix: properly set project on context

* fix: properly retrieve the state based on deployment availability

* fix: check DC if deployment doesn't exist :(

* fix: no need to return a pointer

* fix: change type to `devile: <component name>`

* feat: export GetLocalDevfileStorage to be able to reuse it

* feat: add URL and storage output to describe for devfiles

* fix: typos

* chore: add integration test

* feat: always set discovery client on fakeclient

* feat: cache result of isResourceSupported

* feat: make it possible to create a client from an existing config

* refactor: simplify validateSourceType

* feat: make ListIngressAndRoute work with an optional LocalConfigProvider

* feat: abstract the cluster representation of the component

* fix: only use devfile name

* fix: sort URLs by name to have consistent output

* fix: use action's name to return proper DC instead of relying on count

* feat: make describe integration test plain k8s only, add pushed test

* fix: use PushedComponent to make describe work on k8s and when pushed

* feat: add make target for devfile describe integration tests

* fix: return an error instead of panicking

* feat: add GetComponentNames to avoid building full components and use it

* fix: utility packages shouldn't depend on cli packages

* feat: make occlient link to kclient to be able to use it when needed

* feat: make PushedComponent return URLs as well

* fix: getRemoteComponentMetadate now retrieves URLs from PushedComponent

* fix: typo

* fix: only retrieve routes if they are supported

* fix: no need to keep pointer to Deployment/DeploymentConfig

* fix: removed unused code

* fix: removed unused code

* fix: stupid mistake

* chore: add doc

[skip ci]

* chore: add doc

[skip ci]

* fix: deal with URLs uniformly between s2i and devfile

* fix: URLs are routes unless otherwise specified

* fix: do not set path by default

* fix: sort component names

* test: check to see if that makes test work better that way…

* TMP: panic on unknown GetPushedComponent error to get a stack

* fix: allow unauthorized and forbidden errors to fall back to DC check

* fix: ignore some errors when trying to get URLs or PushedComponents

* fix: lazy init URLs so that they're only retrieved when needed

* refactor: simplify ListIngressAndRoute signature

* fix: also check cause in case the error is wrapped
2020-09-19 09:31:38 -04:00
Priti Kumari
56c69f66bb Comment out docker make target from Makefile (#3896) 2020-09-05 07:00:36 -04:00
Tomas Kral
d7a88c2021 use go get to download gosec (#3895)
official method using install.sh doens't support ppc64
2020-09-05 07:00:28 -04:00
Tomas Kral
ebe51e886b Switch from glide to go mod (#3866)
* switch to go modules

* update vendor (go mod vendor)

* swithing to go mod: update docs and makefile

* update goget-tools

* use go mod verify to check vendor

* Update goget-tools

- pin goget-tools versions
- update gikgo to 1.14.0
- reset GOFLAGS for goget-tools
- fix ginkgo get for Prow

* go mod: replace github.com/kr/pty with github.com/creack/pty

* update vendor (go mod vendor)

* fix make cross target

-mod=vendor was not used for corss compiling
2020-09-03 07:49:41 -04:00
Amit Rout
6c1ff48d3e Run missing debug command against 4.x cluster (#3821)
* Run missing debug command against 4.x cluster

* Updated travis file with respect to the changes

* Fixing job timeout

* Updated test target

* Updated test timeout

* Updated review comment

* clean up

* clean up

* CI time balancing

* CI time balancing and cleanup
2020-08-31 14:22:25 -04:00
Girish Ramnani
68bc98ba89 odo config for devfile (#3702)
* add feature complete odo set and unset

* added json output

* added json output for odo config

* resolved golint

* addressed some comments

* separated out devfile and s2i run sections

* Add example and descriptions

* some spacing

* added integration tests

* only odo injected ports can be managed

* typo resolved and DRYed the config tests

* updated desc and use dns friendly component name

* add devfile config tests to travis

* resolved the panic

* format the help for all config flows

* now a user can remove all ports

* resolved failing tests

* added the format test back

* not pushing in intg test

* added unit tests for devfile config

* unique portname for different protocol

* removed a comment
2020-08-26 06:37:21 -04:00
Priti Kumari
32a845459c Adding plugin handler test makefile target (#3787)
* Adding plugin handler test makefile target

* Adding plugin handler make target in travis
2020-08-21 01:30:48 +02:00
Mrinal Das
7c6dc41853 Adds storage create and delete commands for devfiles. (#3626)
* Adds storage create and delete commands for devfiles.

* Uses a existing error type and creates a new NotFoundError type

* fixes order of errors while creating volumes

* adds json output for storage delete and adds tests

* fixes capitalization of error messages and comments and uses constants in the code

* Adds support for context flag

* Fixes unit test for devfile writer and updates yaml tags for devfile endpoint fields

* Adds context flag in s2i test
2020-08-17 19:34:47 +02:00
Jingfu Wang
5ba5d2ad1a Implement odo env (#3616)
* feat: implement `odo env`

Signed-off-by: jingfu wang <jingfu.j.wang@ibm.com>

* fix: unit tests issue

Signed-off-by: jingfu wang <jingfu.j.wang@ibm.com>

* test: fix envinfo unit tests

Signed-off-by: jingfu wang <jingfu.j.wang@ibm.com>

* fix: disallow unsupported parameters and add tests

Signed-off-by: jingfu wang <jingfu.j.wang@ibm.com>

* test: add integration tests

Signed-off-by: jingfu wang <jingfu.j.wang@ibm.com>

* refactor: make command case-insensitive + tests

Signed-off-by: jingfu wang <jingfu.j.wang@ibm.com>

* refactor: add warning and fix unit test

Signed-off-by: jingfu wang <jingfu.j.wang@ibm.com>

* refactor: fix typo and refactor

Signed-off-by: jingfu wang <jingfu.j.wang@ibm.com>

* fix: unit tests

Signed-off-by: jingfu wang <jingfu.j.wang@ibm.com>

* test: improve integration tests

Signed-off-by: jingfu wang <jingfu.j.wang@ibm.com>
2020-08-12 11:36:35 -04:00
sarveshtamba
8b6a698844 CI support for ODO on IBM P (#3643)
* CI support for ODO on IBM P

* CI support for ODO on IBM P
2020-08-10 11:46:48 -04:00
Tomas Kral
cea3b23f32 Update golangci-lint to latest version and fix some linting errors (#3682)
* make latest golangci-lint happy

* update golangci-lint to 1.30.0
2020-08-06 04:49:58 +02:00
Amit Rout
b3cf595506 Remove deprecated images and update tests (#3587)
* Remove deprecated nodejs 8 images

* Update README

* Updated README

* Addressed review comments

* Fixing unit test failure

* Addressed review comment

* Fixing travis failure

* Checking oc version

* Applying supported image imagestream

* Applying supported image imagestream

* Added supported is

* Debugging

* Cleanup

* Updated test doc

* Cleanup
2020-07-27 03:31:33 +02:00
Zheng Xiao Mei
4b6498c386 CI support for IBM Z (#3529) 2020-07-24 10:19:53 +02:00
Stephanie Cao
81adbcc24f Odo test cmd for devfile 2.0 (#3400)
* first commit to save change

Signed-off-by: Stephanie <stephanie.cao@ibm.com>

* able to run odo test

Signed-off-by: Stephanie <stephanie.cao@ibm.com>

* add test in adapters

Signed-off-by: Stephanie <stephanie.cao@ibm.com>

* test works

Signed-off-by: Stephanie <stephanie.cao@ibm.com>

* add integration test

Signed-off-by: Stephanie <stephanie.cao@ibm.com>

* fix integration test

Signed-off-by: Stephanie <stephanie.cao@ibm.com>

* address code review comments

Signed-off-by: Stephanie <stephanie.cao@ibm.com>

* remove comments

Signed-off-by: Stephanie <stephanie.cao@ibm.com>

* add more tests

Signed-off-by: Stephanie <stephanie.cao@ibm.com>

* fix some typo

Signed-off-by: Stephanie <stephanie.cao@ibm.com>

* remove content added by mistake

Signed-off-by: Stephanie <stephanie.cao@ibm.com>

* update error message, and the integration test

* address review comments

Signed-off-by: Stephanie <stephanie.cao@ibm.com>

* simplify the error return

Signed-off-by: Stephanie <stephanie.cao@ibm.com>

* test command should have 0 args

Signed-off-by: Stephanie <stephanie.cao@ibm.com>

* add test in the docker test description

* modify trivis.yaml file

Signed-off-by: Stephanie <stephanie.cao@ibm.com>
2020-07-16 20:09:05 -04:00
Mrinal Das
9be483fb86 Adds exec command for devfile components with kube push target (#3083)
* Adds exec command for devfile components with kube push target

* Adds comments

* Modifies tests to run on kubernetes clusters

* Modifies exec logic to use GetPodUsingComponentName()

* Fixes context directory detection, adds comments and fixes the example

* Updates names of the Travis tests
2020-07-15 07:25:16 -04:00
Aditi Sharma
a9ebc8cfa1 Implement odo log for devfiles (#3384)
* Implement odo log for devfile

implement odo log for k8s for run command
Fix color unset for follow
Make common function to display log

* Implemented for docker

* Add debug flag for odo log
Add Integrations test for odo log

* Add Docker Integration tests

* Fix unit test for odo log

* Implemented odo logs for debug

* Rebase and address some review comment

* Address some more review comments

* Address some more review comments

* Update odo log debug test

Add log tests in travis
2020-07-09 14:40:54 +02:00
Mrinal Das
fd349dee65 Adds debug command for devfiles (#3059)
* Adds debug command for devfiles

* Fixes comments and variable names

* Adds devfile debug test on kubernetes cluster

* Fixes adapter code for debug

Signed-off-by: mik-dass <mrinald7@gmail.com>

* Converts v1 debug test devfile to v2

* Moves container arg and command overriding to a new function

* Simplifies conditions in test

* Modifies execDevfile for kubernetes component adapter

* Simplies error checking logic in TestUpdateContainersWithSupervisord

* Removes unnecessary else if conditions

* Installs socat before running tests on kubernetes cluster
2020-06-19 09:29:44 -04:00
Maysun J Faisal
9ff207183d Add devfile command flags to watch (#3075)
* save non default devfile cmd in env.yaml for push and watch

Signed-off-by: Maysun J Faisal <maysun.j.faisal@ibm.com>

* Add and update tests for envinfo

Signed-off-by: Maysun J Faisal <maysun.j.faisal@ibm.com>

* Update watch test to incl new watch param

Signed-off-by: Maysun J Faisal <maysun.j.faisal@ibm.com>

* watch integration test

Signed-off-by: Maysun J Faisal <maysun.j.faisal@ibm.com>

* Display msg when devfile commands are changed via odo push

Signed-off-by: Maysun J Faisal <maysun.j.faisal@ibm.com>

* Change Logic for watch flag + feedback 1

Signed-off-by: Maysun J Faisal <maysun.j.faisal@ibm.com>

* Update Watch tests with feedback

Signed-off-by: Maysun J Faisal <maysun.j.faisal@ibm.com>

* disable watch test on kube since we now use oc

Signed-off-by: Maysun J Faisal <maysun.j.faisal@ibm.com>

* Watch test feedback 2

Signed-off-by: Maysun J Faisal <maysun.j.faisal@ibm.com>
2020-05-27 13:49:08 -04:00
Dharmit Shah
20491afbba Modify operator hub tests to run in separate namespaces (#3239)
* Modify operator hub tests to run in separate namespaces

**What type of PR is this?**
/kind cleanup
/kind failing-test

**What does does this PR do / why we need it**:
This PR ensures that each test spec for operator hub is run in a
separate namespace. This is needed because these tests were written in a
stringent fashion which tied the hands while writing additional tests
for the feature.

This PR should help take the tests out of the "odo test statistics"
dashboard.

**Which issue(s) this PR fixes**:

Fixes #3193

**How to test changes / Special notes to the reviewer**:
CI should pass. Specially for Operator Hub tests under
`tests/integration/operatorhub`

* Changes as per PR review

* Remove createEtcdClusterService function and more separate specs

- Removed the function because it *seemed* to be leading to race
  conditions
- Separating specs for the same reason

* Loop for two operators

* Make operator hub tests sequential

We're doing this because parallel run is causing numerous failures in CI
and local. In spite of debugging it for some time, we're not able to fix
it. However, we're on a deadline because operator hub failures are
showing up across the PRs. Hence, for time being, we're making these
tests sequential.

https://github.com/openshift/odo/issues/3244
2020-05-27 06:54:01 -04:00
John Collier
8aa1a4b953 Run devfile docker url tests without kube config (#3223)
* Run devfile docker url tests without kube config

Signed-off-by: John Collier <John.J.Collier@ibm.com>

* Update target

Signed-off-by: John Collier <John.J.Collier@ibm.com>

* Fix typo

Signed-off-by: John Collier <John.J.Collier@ibm.com>
2020-05-21 15:18:23 +02:00
Jingfu Wang
bfa9922b1b Dynamic registry support (#2940)
* Draft PR for dynamic registry support

Signed-off-by: jingfu wang <jingfu.j.wang@ibm.com>

* Handle migration

Signed-off-by: jingfu wang <jingfu.j.wang@ibm.com>

* Handle migration with experimental

Signed-off-by: jingfu wang <jingfu.j.wang@ibm.com>

* Improve error handling

Signed-off-by: jingfu wang <jingfu.j.wang@ibm.com>

* Add unit tests

Signed-off-by: jingfu wang <jingfu.j.wang@ibm.com>

* Fix unit tests

Signed-off-by: jingfu wang <jingfu.j.wang@ibm.com>

* Fix unit tests

Signed-off-by: jingfu wang <jingfu.j.wang@ibm.com>

* Add integration tests

Signed-off-by: jingfu wang <jingfu.j.wang@ibm.com>

* Update "odo delete" and display registry name

Signed-off-by: jingfu wang <jingfu.j.wang@ibm.com>

* Add confirmation dialog for update and delete

Signed-off-by: jingfu wang <jingfu.j.wang@ibm.com>

* Fix catalog test

Signed-off-by: jingfu wang <jingfu.j.wang@ibm.com>

* Update help page and delete functions

Signed-off-by: jingfu wang <jingfu.j.wang@ibm.com>

* Help page cleanup

Signed-off-by: jingfu wang <jingfu.j.wang@ibm.com>

* update confirmation page

Signed-off-by: jingfu wang <jingfu.j.wang@ibm.com>

* Add URL validation

Signed-off-by: jingfu wang <jingfu.j.wang@ibm.com>

* Fix unit test

Signed-off-by: jingfu wang <jingfu.j.wang@ibm.com>

* Use built-in library for URL parsing

Signed-off-by: jingfu wang <jingfu.j.wang@ibm.com>

* Update message

Signed-off-by: jingfu wang <jingfu.j.wang@ibm.com>

* Update help page and use const default registry

Signed-off-by: jingfu wang <jingfu.j.wang@ibm.com>

* Update registry URL

Signed-off-by: jingfu wang <jingfu.j.wang@ibm.com>

* Update help page

Signed-off-by: jingfu wang <jingfu.j.wang@ibm.com>

* Update registry tests

Signed-off-by: jingfu wang <jingfu.j.wang@ibm.com>

* Add github registry example

Signed-off-by: jingfu wang <jingfu.j.wang@ibm.com>

* Update template

Signed-off-by: jingfu wang <jingfu.j.wang@ibm.com>

* Fix typo

Signed-off-by: jingfu wang <jingfu.j.wang@ibm.com>

* Update k8s packages

Signed-off-by: jingfu wang <jingfu.j.wang@ibm.com>

* Fix registry test

Signed-off-by: jingfu wang <jingfu.j.wang@ibm.com>
2020-05-09 13:07:54 +02:00
Amit Rout
e9fe72f162 Remove oc setup for devfile push docker target (#2996)
* Remove oc setup for devfile push docker target

* Updating assert message

* Updating assert message

* Failure fix

* Added comment meaasge

* Updating comment message and fixing failure

* Updating comment message
2020-05-04 17:24:04 +02:00
John Collier
6b1d794708 Don't list imagestreams when using Docker (#3039)
Signed-off-by: John Collier <John.J.Collier@ibm.com>
2020-04-30 03:49:35 +02:00
Amit Rout
26c0a654ce Run test on two ginkgo test node (#3001) 2020-04-27 21:01:34 +05:30
Dharmit Shah
6caae7ce62 Create operator backed service from a yaml file (#2901)
* Create operator backed service from a yaml file

* Changes based on PR review

* Add failing test and make service name mandatory in yaml

* Changes based on PR feedback

https://github.com/openshift/odo/pull/2901#pullrequestreview-396343086

* Added wait to `oc delete` since CI's creating before having deleted

https://storage.googleapis.com/origin-ci-test/pr-logs/pull/openshift_odo/2901/pull-ci-openshift-odo-master-v4.3-integration-e2e-benchmark/2140/build-log.txt

* Make operator hub tests run serially and reduce time-out for pod deletion

* Use string.replace to rename CRD and run tests parallely
2020-04-24 09:44:34 +02:00
Stephanie Cao
2086305a0c local docker support for url creation and deletion (#2906)
* clean git history

* fix the bug that hostconfig got overwritten

* fix devfile url test

* Add ports to container

Signed-off-by: John Collier <John.J.Collier@ibm.com>

* fix the bug of container won't restart

* fix ineffectual variable assignments

Co-authored-by: John Collier <John.J.Collier@ibm.com>
2020-04-23 19:53:41 +02:00
Jonathan West
d03ed71b48 Use 'odo delete` to delete a component that's running locally with odo (#2905)
* Add docker delete support

* On container delete, add deletion of projects volume

* Delete volumes only after deleting containers

* Update delete volume tests based on review comments

* Update delete volume tests based on review comments

* Rebase with latest from master

* Rebase with latest from master

* Rebase and update dependencies

* Rebase and update dependencies
2020-04-23 13:24:59 +02:00
Priti Kumari
c12b329af4 Increasing ginkgo test node to optimize total test time in CI (#2942) 2020-04-21 09:36:58 -04:00
Tomas Kral
c15e2d5ebd remove benchark tests (#2903) 2020-04-18 22:58:25 -04:00
John Collier
22a63649b0 Implement a basic, first pass odo push with Docker support (#2806)
* Implement docker adapter

Signed-off-by: John Collier <John.J.Collier@ibm.com>

* Docker component support

Signed-off-by: John Collier <John.J.Collier@ibm.com>

* Implement odo push for Docker

Signed-off-by: John Collier <John.J.Collier@ibm.com>

* Create helper file for integration tests

Signed-off-by: John Collier <John.J.Collier@ibm.com>

* Fix build and test issues

Signed-off-by: John Collier <John.J.Collier@ibm.com>

* Don't require kube client for odo create

Signed-off-by: John Collier <John.J.Collier@ibm.com>

* Fix storage tests

Signed-off-by: John Collier <John.J.Collier@ibm.com>

* Address gosec messages

Signed-off-by: John Collier <John.J.Collier@ibm.com>

* Finish docker integration tests

Signed-off-by: John Collier <John.J.Collier@ibm.com>

* Fix borked git rebase

Signed-off-by: John Collier <John.J.Collier@ibm.com>

* Address review comments

Signed-off-by: John Collier <John.J.Collier@ibm.com>

* Fix merge conflict issues

Signed-off-by: John Collier <John.J.Collier@ibm.com>

* Fix more merge conflict issues

Signed-off-by: John Collier <John.J.Collier@ibm.com>

* Fix more merge conflicts in tests

Signed-off-by: John Collier <John.J.Collier@ibm.com>

* Address rev

Signed-off-by: John Collier <John.J.Collier@ibm.com>

* Don't require kube context

Signed-off-by: John Collier <John.J.Collier@ibm.com>
2020-04-15 17:48:26 -07:00
Mrinal Das
cef105be1d Adds delete function for devfiles support. (#2763)
* Adds delete function for devfiles support.

This PR also adds support for all flag. The all flag deletes the env folder present in the .odo folder.

Signed-off-by: mik-dass <mrinald7@gmail.com>

* Adds integration test for devfile delete
2020-04-08 04:12:00 +02:00
Stephanie Cao
fb3fa51fa2 Odo url Ingress support (#2762)
* able to create env folder and file

Signed-off-by: Stephanie <stephanie.cao@ibm.com>

* WIP-migrated from poc branch, still need to fix context

Signed-off-by: Stephanie <stephanie.cao@ibm.com>

* wip-fix some issues blocking normal odo url create

Signed-off-by: Stephanie <stephanie.cao@ibm.com>

* small modification on deleteURL, currently blocked by service

Signed-off-by: Stephanie <stephanie.cao@ibm.com>

* able to create service using first container port

Signed-off-by: Stephanie <stephanie.cao@ibm.com>

* move serviceSpec creation to generator.go

Signed-off-by: Stephanie <stephanie.cao@ibm.com>

* add service test

Signed-off-by: Stephanie <stephanie.cao@ibm.com>

* sanitize the port name

Signed-off-by: Stephanie <stephanie.cao@ibm.com>

* add secret and port check

Signed-off-by: Stephanie <stephanie.cao@ibm.com>

* add unit tests for added functions

Signed-off-by: Stephanie <stephanie.cao@ibm.com>

* add make

* able to delete url from env.yaml

Signed-off-by: Stephanie <stephanie.cao@ibm.com>

* raname tls-secret and host, make url delete works

* add intergation test for url. still need to work on intergation tests

Signed-off-by: Stephanie <stephanie.cao@ibm.com>

* finish integration tests

Signed-off-by: Stephanie <stephanie.cao@ibm.com>

* format secrets_test

Signed-off-by: Stephanie <stephanie.cao@ibm.com>

* fix unit test

Signed-off-by: Stephanie <stephanie.cao@ibm.com>

* fix unittest failure

Signed-off-by: Stephanie <stephanie.cao@ibm.com>

* fix indentation

Signed-off-by: Stephanie <stephanie.cao@ibm.com>

* update the code based on comments

Signed-off-by: Stephanie <stephanie.cao@ibm.com>

* fix build failure

Signed-off-by: Stephanie <stephanie.cao@ibm.com>

* fix failure

Signed-off-by: Stephanie <stephanie.cao@ibm.com>

* avoid calling list multiple times

Signed-off-by: Stephanie <stephanie.cao@ibm.com>

* modify based on comments

Signed-off-by: Stephanie <stephanie.cao@ibm.com>

* fix test failure

Signed-off-by: Stephanie <stephanie.cao@ibm.com>

* make now flag work

Signed-off-by: Stephanie <stephanie.cao@ibm.com>

* try to fix flaky tests

* use existing function to wait for output

Signed-off-by: Stephanie <stephanie.cao@ibm.com>

* try to fix namespace mismatch

Signed-off-by: Stephanie <stephanie.cao@ibm.com>

* use project flag instead of namespace flag dor creation

* remove CreateNewDevfileContext since we get the cmpname from env.yaml now

* fix undefined failure
2020-04-04 08:06:14 +02:00