diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-10-17 18:06:17 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-10-17 18:06:17 +0300 |
commit | 238d22c07218adf2b8f3db630ee8b74ca6f29df5 (patch) | |
tree | 23fd5f85efef0fb95eb73bf6395d5b7e8c0f1b9f /spec/lib/gitlab | |
parent | 6b75320f525f841454f1ab162d141d3610f2e77b (diff) |
Add latest changes from gitlab-org/gitlab@masterlist
Diffstat (limited to 'spec/lib/gitlab')
-rw-r--r-- | spec/lib/gitlab/ci/trace/stream_spec.rb | 54 | ||||
-rw-r--r-- | spec/lib/gitlab/gitaly_client/commit_service_spec.rb | 25 | ||||
-rw-r--r-- | spec/lib/gitlab/import_export/all_models.yml | 7 | ||||
-rw-r--r-- | spec/lib/gitlab/import_export/safe_model_attributes.yml | 6 |
4 files changed, 13 insertions, 79 deletions
diff --git a/spec/lib/gitlab/ci/trace/stream_spec.rb b/spec/lib/gitlab/ci/trace/stream_spec.rb index dd5f2f97ac9..1baea13299b 100644 --- a/spec/lib/gitlab/ci/trace/stream_spec.rb +++ b/spec/lib/gitlab/ci/trace/stream_spec.rb @@ -248,60 +248,6 @@ describe Gitlab::Ci::Trace::Stream, :clean_gitlab_redis_cache do end end - describe '#html_with_state' do - shared_examples_for 'html_with_states' do - it 'returns html content with state' do - result = stream.html_with_state - - expect(result.html).to eq("<span>1234</span>") - end - - context 'follow-up state' do - let!(:last_result) { stream.html_with_state } - - before do - data_stream.seek(4, IO::SEEK_SET) - data_stream.write("5678") - stream.seek(0) - end - - it "returns appended trace" do - result = stream.html_with_state(last_result.state) - - expect(result.append).to be_truthy - expect(result.html).to eq("<span>5678</span>") - end - end - end - - context 'when stream is StringIO' do - let(:data_stream) do - StringIO.new("1234") - end - - let(:stream) do - described_class.new { data_stream } - end - - it_behaves_like 'html_with_states' - end - - context 'when stream is ChunkedIO' do - let(:data_stream) do - Gitlab::Ci::Trace::ChunkedIO.new(build).tap do |chunked_io| - chunked_io.write("1234") - chunked_io.seek(0, IO::SEEK_SET) - end - end - - let(:stream) do - described_class.new { data_stream } - end - - it_behaves_like 'html_with_states' - end - end - describe '#html' do shared_examples_for 'htmls' do it "returns html" do diff --git a/spec/lib/gitlab/gitaly_client/commit_service_spec.rb b/spec/lib/gitlab/gitaly_client/commit_service_spec.rb index ba6abba4e61..71489adb373 100644 --- a/spec/lib/gitlab/gitaly_client/commit_service_spec.rb +++ b/spec/lib/gitlab/gitaly_client/commit_service_spec.rb @@ -252,31 +252,6 @@ describe Gitlab::GitalyClient::CommitService do end end - describe '#patch' do - let(:request) do - Gitaly::CommitPatchRequest.new( - repository: repository_message, revision: revision - ) - end - let(:response) { [double(data: "my "), double(data: "diff")] } - - subject { described_class.new(repository).patch(revision) } - - it 'sends an RPC request' do - expect_any_instance_of(Gitaly::DiffService::Stub).to receive(:commit_patch) - .with(request, kind_of(Hash)).and_return([]) - - subject - end - - it 'concatenates the responses data' do - allow_any_instance_of(Gitaly::DiffService::Stub).to receive(:commit_patch) - .with(request, kind_of(Hash)).and_return(response) - - expect(subject).to eq("my diff") - end - end - describe '#commit_stats' do let(:request) do Gitaly::CommitStatsRequest.new( diff --git a/spec/lib/gitlab/import_export/all_models.yml b/spec/lib/gitlab/import_export/all_models.yml index 187a8a37179..1efd7bf5c71 100644 --- a/spec/lib/gitlab/import_export/all_models.yml +++ b/spec/lib/gitlab/import_export/all_models.yml @@ -27,6 +27,7 @@ issues: - design_versions - prometheus_alerts - prometheus_alert_events +- self_managed_prometheus_alert_events events: - author - project @@ -81,6 +82,7 @@ releases: - links - milestone_releases - milestones +- evidence links: - release project_members: @@ -400,6 +402,7 @@ project: - operations_feature_flags_client - prometheus_alerts - prometheus_alert_events +- self_managed_prometheus_alert_events - software_license_policies - project_registry - packages @@ -473,6 +476,8 @@ prometheus_alerts: - prometheus_alert_events prometheus_alert_events: - project +self_managed_prometheus_alert_events: +- project epic_issues: - issue - epic @@ -506,6 +511,8 @@ lists: milestone_releases: - milestone - release +evidences: +- release design: &design - issue - actions diff --git a/spec/lib/gitlab/import_export/safe_model_attributes.yml b/spec/lib/gitlab/import_export/safe_model_attributes.yml index ebc5d9d1f56..8ae571a69ef 100644 --- a/spec/lib/gitlab/import_export/safe_model_attributes.yml +++ b/spec/lib/gitlab/import_export/safe_model_attributes.yml @@ -127,6 +127,12 @@ Release: - created_at - updated_at - released_at +Evidence: +- id +- release_id +- summary +- created_at +- updated_at Releases::Link: - id - release_id |