New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide a ‘oc’ command proxy #830

Closed
cescoffier opened this Issue Oct 18, 2017 · 4 comments

Comments

Projects
None yet
4 participants
@cescoffier

cescoffier commented Oct 18, 2017

I often need to execute ‘oc’ commands (such as ‘oc create -f ..., or oc new-app ...) in my test. Most of the time it’s to execute the exact same instructions we give to our user and so check that the doc is still valid.

It would be great to have a utility class calling ‘oc’ behind the scene. For instance, method allowing to execute oc command, retrieve the result (status) and output (StrIng or byte[]).

I can also see more and more usage of such a feature with the service catalog (with the new bind and unblind commands).

@lordofthejars

This comment has been minimized.

Show comment
Hide comment
@lordofthejars

lordofthejars Oct 19, 2017

Member

Just one thing, when you mean running oc you mean just pass an string with arguments of oc or you want to have it in a DSL approach? The latter on seems so complicated.

Member

lordofthejars commented Oct 19, 2017

Just one thing, when you mean running oc you mean just pass an string with arguments of oc or you want to have it in a DSL approach? The latter on seems so complicated.

@cescoffier

This comment has been minimized.

Show comment
Hide comment
@cescoffier

cescoffier Oct 19, 2017

Let's do something simple @lordofthejars:

ExecResult res = oc.execute("create -f mytemplate.yaml");
assertThat(res).succeed().outputContains("bla bla bla");

So we can just copy and paste our commands.

cescoffier commented Oct 19, 2017

Let's do something simple @lordofthejars:

ExecResult res = oc.execute("create -f mytemplate.yaml");
assertThat(res).succeed().outputContains("bla bla bla");

So we can just copy and paste our commands.

@lordofthejars

This comment has been minimized.

Show comment
Hide comment
@lordofthejars

lordofthejars Oct 19, 2017

Member

ok perfect, thanks

Member

lordofthejars commented Oct 19, 2017

ok perfect, thanks

@lordofthejars lordofthejars added this to the 1.9.2 milestone Oct 19, 2017

@lordofthejars

This comment has been minimized.

Show comment
Hide comment
@lordofthejars

lordofthejars Oct 31, 2017

Member

Probably for this issue, more than implementing an integration/wrapper around CLI calls, I think it wil be better to document how to use Arquillian Spacelift in tests.

Member

lordofthejars commented Oct 31, 2017

Probably for this issue, more than implementing an integration/wrapper around CLI calls, I think it wil be better to document how to use Arquillian Spacelift in tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment