8000 export: name flag for exporting multi-app pods by tjdett · Pull Request #3030 · rkt/rkt · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on Feb 24, 2020. It is now read-only.

export: name flag for exporting multi-app pods #3030

Merged
merged 2 commits into from
Aug 11, 2016

Conversation

tjdett
Copy link
Contributor
@tjdett tjdett commented Aug 5, 2016

Names are specified in a similar manner to rkt enter:

$ rkt export --help
NAME:
        export - Export an app from an exited pod to an ACI file

USAGE:
        rkt export [--app=APPNAME] UUID OUTPUT_ACI_FILE

DESCRIPTION:
        UUID should be the uuid of an exited pod.

OPTIONS:
      --app=""                  name of the app to export within the specified pod
      --overwrite[=false]       overwrite output ACI

As with rkt enter, previous behaviour for single app pods is preserved. A name only needs to be specified for multi-app pods.

Previously only single-app pods could export apps. For multi-app pods,
an app name can now be specified, in a similar manner to `rkt enter`.
@alban
Copy link
Member
alban commented Aug 5, 2016

Thanks! Could you add a test for this? There are already some tests in tests/rkt_export_test.go and tests/rkt_export_container_test.go.

@iaguis
Copy link
Member
iaguis commented Aug 5, 2016

lgtm modulo tests

@ghost
Copy link
ghost commented Aug 8, 2016

Can one of the admins verify this patch?

@tjdett
Copy link
Contributor Author
tjdett commented Aug 8, 2016

@alban @iaguis I've added a very basic "white box"-style test which tests specifying an app name for a single app pod.

I originally tried adding a test for multi-app pods, but the simplest version of this would require #1204 to be resolved. Otherwise I'd need to build a new test ACI. If you do want a test like that, I'd appreciate some guidance on how you'd like that done.

@lucab
Copy link
Member
lucab commented Aug 8, 2016

ok to test

@iaguis
Copy link
Member
iaguis commented Aug 8, 2016

If you do want a test like that, I'd appreciate some guidance on how you'd like that done.

You need to use patchTestACI() to generate a new test ACI with a different name. Here's an example.

I'd generate a new test ACI without the file we want to check or with different content and then check that the exported image has the right file with the right content.

Thanks!

@iaguis
Copy link
Member
iaguis commented Aug 11, 2016

Let's merge this now and follow up with a better test.

@iaguis iaguis merged commit bce9196 into rkt:master Aug 11, 2016
@tjdett tjdett deleted the named-app-export branch August 16, 2016 04:48
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0