From 1cca04a18ab92059d6a941ef4531fbad7cc52cb1 Mon Sep 17 00:00:00 2001 From: Philippe PITTOLI Date: Thu, 30 Jan 2020 17:46:51 +0100 Subject: [PATCH] common-tests: compilable again --- src/tests/common-tests.cr | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/tests/common-tests.cr b/src/tests/common-tests.cr index 393a668..584e906 100644 --- a/src/tests/common-tests.cr +++ b/src/tests/common-tests.cr @@ -48,33 +48,33 @@ pp! token puts # for later -requests = Array(FileStorage::Message::Request).new +upload_requests = Array(FileStorage::UploadRequest).new # UploadRequest File.open(filename) do |file| file_info = FileStorage::FileInfo.new file, [ "tag1", "tag2" ] - upload_request = FileStorage::Message::UploadRequest.new file_info + upload_request = FileStorage::UploadRequest.new file_info pp! upload_request - requests << upload_request + upload_requests << upload_request end puts # DownloadRequest -pp! FileStorage::Message::DownloadRequest.new uuid: "abc" -pp! FileStorage::Message::DownloadRequest.new name: "the other one" -pp! FileStorage::Message::DownloadRequest.new tags: [ "tag1", "tag2" ] +pp! FileStorage::DownloadRequest.new filedigest: "abc" +pp! FileStorage::DownloadRequest.new name: "the other one" +pp! FileStorage::DownloadRequest.new tags: [ "tag1", "tag2" ] puts # AuthenticationMessage -pp! FileStorage::Message::Authentication.new token, requests +pp! FileStorage::Authentication.new token, upload_requests #, download_requests puts # Response -pp! FileStorage::Message::Response.new "UUID", "Ok" -pp! FileStorage::Message::Response.new "UUID", "Error", "Cannot store the file" +pp! FileStorage::Response.new "Message ID", "Ok" +pp! FileStorage::Response.new "Message ID", "Error", "Cannot store the file" puts @@ -83,5 +83,5 @@ File.open(filename) do |file| file_info = FileStorage::FileInfo.new file, [ "tag1", "tag2" ] somedata = "coucou".to_slice - pp! FileStorage::Message::Transfer.new file_info, 1, somedata + pp! FileStorage::Transfer.new file_info, 1, somedata end