Skip to content

Commit

Permalink
VIP - Add tests for move_and_replace_build_files and Prepend compiled…
Browse files Browse the repository at this point in the history
… apps of an Library
  • Loading branch information
shahryarjb committed Jun 29, 2024
1 parent 50b7dcb commit f4a904b
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions test/installer/library_handler_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,18 @@ defmodule MishkaInstallerTest.Installer.LibraryHandlerTest do
compile_type: :cmd
})

# move_and_replace_build_files
{:ok, moved_files} =
assert LibraryHandler.move_and_replace_build_files(%{
app: "elixir-uuid",
version: "1.2.1"
})

# Prepend compiled apps of an Library
:ok = assert LibraryHandler.prepend_compiled_apps(moved_files)

File.rm_rf(File.cwd!() <> "/_build/test/lib/elixir_uuid")

File.rm_rf(File.cwd!() <> "/deployment/test/extensions/#{temp_name}")
end

Expand Down Expand Up @@ -99,12 +111,7 @@ defmodule MishkaInstallerTest.Installer.LibraryHandlerTest do
"/deployment/test/extensions" =~ assert LibraryHandler.extensions_path()
end

test "Prepend compiled apps of an Library" do
# true = Code.prepend_path(path)
# assert to_charlist(path) in :code.get_path()
end

test "Move and replace build files" do
# LibraryHandler.move_and_replace_build_files(app)
test "Mix command_execution error" do
{:error, _error} = assert LibraryHandler.command_execution(:mix, "", "")
end
end

0 comments on commit f4a904b

Please sign in to comment.