Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
nicholas-goodwin committed May 25, 2023
1 parent eeeeb84 commit 069804b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 17 deletions.
8 changes: 2 additions & 6 deletions test/compose_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,12 @@ defmodule Divo.ComposeTest do
test "docker stop command called with expected arguments" do
:ok = Divo.Compose.stop()

assert_called(
System.cmd("docker-compose", ["--file", "/tmp/divo.compose", "stop"], stderr_to_stdout: true)
)
assert_called(System.cmd("docker-compose", ["--file", "/tmp/divo.compose", "stop"], stderr_to_stdout: true))
end

test "docker stop and rm commands called with expected arguments on kill" do
:ok = Divo.Compose.kill()

assert_called(
System.cmd("docker-compose", ["--file", "/tmp/divo.compose", "down"], stderr_to_stdout: true)
)
assert_called(System.cmd("docker-compose", ["--file", "/tmp/divo.compose", "down"], stderr_to_stdout: true))
end
end
22 changes: 11 additions & 11 deletions test/file_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -47,20 +47,20 @@ defmodule Divo.FileTest do
end
end

test "concatenates compose file from multiple implementations of the behaviour" do
allow(File.write!(any(), any()), return: :ok)
allow(System.get_env("TMPDIR"), return: "/var/tmp/foo")
test "concatenates compose file from multiple implementations of the behaviour" do
allow(File.write!(any(), any()), return: :ok)
allow(System.get_env("TMPDIR"), return: "/var/tmp/foo")

services = [
{DivoFoobar, [db_password: "we-are-divo", db_name: "foobar-db", something: "else"]},
DivoBarbaz
]
services = [
{DivoFoobar, [db_password: "we-are-divo", db_name: "foobar-db", something: "else"]},
DivoBarbaz
]

TemporaryEnv.put :divo, :divo, services do
config = Divo.Helper.fetch_config()
TemporaryEnv.put :divo, :divo, services do
config = Divo.Helper.fetch_config()

assert Divo.File.ensure_file(config) == "/var/tmp/foo/divo.compose"
assert Divo.File.ensure_file(config) == "/var/tmp/foo/divo.compose"
end
end
end
end
end

0 comments on commit 069804b

Please sign in to comment.