Skip to content

Commit d994a29

Browse files
committed
Fix containerCommit() to not pause container if $pause is false
1 parent 19d23b4 commit d994a29

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

‎src/Client.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1217,7 +1217,7 @@ public function containerCommit($container, $repo = null, $tag = null, $comment
12171217
'tag' => $tag,
12181218
'comment' => $comment,
12191219
'author' => $author,
1220-
'pause' => $pause,
1220+
'pause' => $pause ? 1 : 0,
12211221
'changes' => $changes,
12221222
)
12231223
),

‎tests/ClientTest.php‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -630,6 +630,14 @@ public function testCommit()
630630
$this->expectPromiseResolveWith($json, $this->client->containerCommit('123', $config));
631631
}
632632

633+
public function testCommitWithoutPause()
634+
{
635+
$json = array();
636+
$this->expectRequestFlow('post', 'commit?container=123&pause=0', $this->createResponseJson($json), 'expectJson');
637+
638+
$this->expectPromiseResolveWith($json, $this->client->containerCommit('123', null, null, null, null, false));
639+
}
640+
633641
public function testCommitWithAllParams()
634642
{
635643
$json = array();

0 commit comments

Comments
 (0)