2021-01-03 14:25:43 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
require 'spec_helper'
|
|
|
|
|
|
|
|
RSpec.describe API::DebianGroupPackages do
|
|
|
|
include HttpBasicAuthHelpers
|
|
|
|
include WorkhorseHelpers
|
|
|
|
|
2021-06-08 01:23:25 +05:30
|
|
|
include_context 'Debian repository shared context', :group, false do
|
|
|
|
describe 'GET groups/:id/-/packages/debian/dists/*distribution/Release.gpg' do
|
2021-09-04 01:27:46 +05:30
|
|
|
let(:url) { "/groups/#{container.id}/-/packages/debian/dists/#{distribution.codename}/Release.gpg" }
|
2021-01-03 14:25:43 +05:30
|
|
|
|
2021-06-08 01:23:25 +05:30
|
|
|
it_behaves_like 'Debian repository read endpoint', 'GET request', :not_found
|
2021-01-03 14:25:43 +05:30
|
|
|
end
|
|
|
|
|
2021-06-08 01:23:25 +05:30
|
|
|
describe 'GET groups/:id/-/packages/debian/dists/*distribution/Release' do
|
2021-09-04 01:27:46 +05:30
|
|
|
let(:url) { "/groups/#{container.id}/-/packages/debian/dists/#{distribution.codename}/Release" }
|
2021-01-03 14:25:43 +05:30
|
|
|
|
2021-09-30 23:02:18 +05:30
|
|
|
it_behaves_like 'Debian repository read endpoint', 'GET request', :success, /^Codename: fixture-distribution\n$/
|
2021-01-03 14:25:43 +05:30
|
|
|
end
|
|
|
|
|
2021-06-08 01:23:25 +05:30
|
|
|
describe 'GET groups/:id/-/packages/debian/dists/*distribution/InRelease' do
|
2021-09-04 01:27:46 +05:30
|
|
|
let(:url) { "/groups/#{container.id}/-/packages/debian/dists/#{distribution.codename}/InRelease" }
|
2021-01-03 14:25:43 +05:30
|
|
|
|
2021-09-30 23:02:18 +05:30
|
|
|
it_behaves_like 'Debian repository read endpoint', 'GET request', :success, /^Codename: fixture-distribution\n$/
|
2021-01-03 14:25:43 +05:30
|
|
|
end
|
|
|
|
|
2021-06-08 01:23:25 +05:30
|
|
|
describe 'GET groups/:id/-/packages/debian/dists/*distribution/:component/binary-:architecture/Packages' do
|
2021-09-30 23:02:18 +05:30
|
|
|
let(:url) { "/groups/#{container.id}/-/packages/debian/dists/#{distribution.codename}/#{component.name}/binary-#{architecture.name}/Packages" }
|
2021-01-03 14:25:43 +05:30
|
|
|
|
2021-09-30 23:02:18 +05:30
|
|
|
it_behaves_like 'Debian repository read endpoint', 'GET request', :success, /Description: This is an incomplete Packages file/
|
2021-01-03 14:25:43 +05:30
|
|
|
end
|
|
|
|
|
2021-06-08 01:23:25 +05:30
|
|
|
describe 'GET groups/:id/-/packages/debian/pool/:component/:letter/:source_package/:file_name' do
|
2021-09-30 23:02:18 +05:30
|
|
|
let(:url) { "/groups/#{container.id}/-/packages/debian/pool/#{component.name}/#{letter}/#{source_package}/#{package_name}_#{package_version}_#{architecture.name}.deb" }
|
2021-01-03 14:25:43 +05:30
|
|
|
|
2021-09-04 01:27:46 +05:30
|
|
|
it_behaves_like 'Debian repository read endpoint', 'GET request', :success, /^TODO File$/
|
2021-01-03 14:25:43 +05:30
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|