Closes gh-11536
This commit is contained in:
Johnny Lim
2018-01-08 09:02:38 +09:00
committed by Stephane Nicoll
parent 6ea6adb10e
commit 0f0c6e0729
8 changed files with 28 additions and 45 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2017 the original author or authors.
* Copyright 2012-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -403,11 +403,10 @@ public class SysVinitLaunchScriptIT {
@Override
protected Void execute(CopyToContainerCmd command) {
try {
InputStream streamToUpload = new FileInputStream(CompressArchiveUtil
.archiveTARFiles(command.getFile().getParentFile(),
Arrays.asList(command.getFile()),
command.getFile().getName()));
try (InputStream streamToUpload = new FileInputStream(CompressArchiveUtil
.archiveTARFiles(command.getFile().getParentFile(),
Arrays.asList(command.getFile()),
command.getFile().getName()))) {
WebTarget webResource = getBaseResource().path("/containers/{id}/archive")
.resolveTemplate("id", command.getContainer());
webResource.queryParam("path", ".")