Commit c5f120e4 authored by Zach Hilman's avatar Zach Hilman

Move conan_sources.tgz to recipe and add spec

parent 836fa990
...@@ -18,8 +18,8 @@ class Packages::Conan::FileMetadatum < ApplicationRecord ...@@ -18,8 +18,8 @@ class Packages::Conan::FileMetadatum < ApplicationRecord
enum conan_file_type: { recipe_file: 1, package_file: 2 } enum conan_file_type: { recipe_file: 1, package_file: 2 }
RECIPE_FILES = %w[conanfile.py conanmanifest.txt].freeze RECIPE_FILES = %w[conanfile.py conanmanifest.txt conan_sources.tgz].freeze
PACKAGE_FILES = %w[conaninfo.txt conanmanifest.txt conan_export.tgz conan_package.tgz conan_sources.tgz].freeze PACKAGE_FILES = %w[conaninfo.txt conanmanifest.txt conan_package.tgz].freeze
PACKAGE_BINARY = 'conan_package.tgz' PACKAGE_BINARY = 'conan_package.tgz'
private private
......
...@@ -419,7 +419,8 @@ describe API::ConanPackages do ...@@ -419,7 +419,8 @@ describe API::ConanPackages do
let(:params) do let(:params) do
{ "conanfile.py": 24, { "conanfile.py": 24,
"conanmanifext.txt": 123 } "conanmanifext.txt": 123,
"conan_sources.tgz": 523 }
end end
subject { post api("/packages/conan/v1/conans/#{recipe_path}/upload_urls"), params: params, headers: headers } subject { post api("/packages/conan/v1/conans/#{recipe_path}/upload_urls"), params: params, headers: headers }
...@@ -431,7 +432,8 @@ describe API::ConanPackages do ...@@ -431,7 +432,8 @@ describe API::ConanPackages do
expected_response = { expected_response = {
'conanfile.py': "#{Settings.gitlab.base_url}/api/v4/packages/conan/v1/files/#{package.conan_recipe_path}/0/export/conanfile.py", 'conanfile.py': "#{Settings.gitlab.base_url}/api/v4/packages/conan/v1/files/#{package.conan_recipe_path}/0/export/conanfile.py",
'conanmanifest.txt': "#{Settings.gitlab.base_url}/api/v4/packages/conan/v1/files/#{package.conan_recipe_path}/0/export/conanmanifest.txt" 'conanmanifest.txt': "#{Settings.gitlab.base_url}/api/v4/packages/conan/v1/files/#{package.conan_recipe_path}/0/export/conanmanifest.txt",
'conanmanifest.txt': "#{Settings.gitlab.base_url}/api/v4/packages/conan/v1/files/#{package.conan_recipe_path}/0/export/conan_sources.tgz"
} }
expect(response.body).to eq(expected_response.to_json) expect(response.body).to eq(expected_response.to_json)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment