diff --git a/lib/livebook/apps/teams_app_spec.ex b/lib/livebook/apps/teams_app_spec.ex index f5ef25154..b440929db 100644 --- a/lib/livebook/apps/teams_app_spec.ex +++ b/lib/livebook/apps/teams_app_spec.ex @@ -58,6 +58,8 @@ defimpl Livebook.Apps.AppSpec, for: Livebook.Apps.TeamsAppSpec do end defp unzip(archive_binary, files_tmp_path) do + File.mkdir_p!(files_tmp_path) + case :zip.extract(archive_binary, [:memory]) do {:ok, entries} -> Enum.reduce_while(entries, {:error, "notebook file missing in the app archive"}, fn diff --git a/test/livebook_teams/hubs/team_client_test.exs b/test/livebook_teams/hubs/team_client_test.exs index 75604329e..c8f96648a 100644 --- a/test/livebook_teams/hubs/team_client_test.exs +++ b/test/livebook_teams/hubs/team_client_test.exs @@ -633,12 +633,15 @@ defmodule Livebook.Hubs.TeamClientTest do notebook = %{ Livebook.Notebook.new() | app_settings: %{Livebook.Notebook.AppSettings.new() | slug: slug}, + file_entries: [%{type: :attachment, name: "image.jpg"}], name: title, hub_id: team.id, deployment_group_id: deployment_group_id } files_dir = Livebook.FileSystem.File.local(tmp_dir) + image_file = Livebook.FileSystem.File.resolve(files_dir, "image.jpg") + :ok = Livebook.FileSystem.File.write(image_file, "content") {:ok, %Livebook.Teams.AppDeployment{file: zip_content} = app_deployment} = Livebook.Teams.AppDeployment.new(notebook, files_dir)