Commit 8fa98066 authored by Siddharth Asthana's avatar Siddharth Asthana

Remove date from Seat Link data fields

Changelog: changed
MR: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/65190
EE: true
parent 095e2843
...@@ -40,7 +40,6 @@ module Gitlab ...@@ -40,7 +40,6 @@ module Gitlab
{ {
gitlab_version: Gitlab::VERSION, gitlab_version: Gitlab::VERSION,
timestamp: timestamp.iso8601, timestamp: timestamp.iso8601,
date: timestamp.to_date.to_s,
license_key: key, license_key: key,
max_historical_user_count: max_users, max_historical_user_count: max_users,
billable_users_count: billable_users_count, billable_users_count: billable_users_count,
......
...@@ -396,7 +396,6 @@ RSpec.describe Admin::ApplicationSettingsController do ...@@ -396,7 +396,6 @@ RSpec.describe Admin::ApplicationSettingsController do
body = response.body body = response.body
expect(body).to start_with('<span id="LC1" class="line" lang="json">') expect(body).to start_with('<span id="LC1" class="line" lang="json">')
expect(body).to include('<span class="nl">"license_key"</span>') expect(body).to include('<span class="nl">"license_key"</span>')
expect(body).to include("<span class=\"s2\">\"#{yesterday.to_date}\"</span>")
expect(body).to include("<span class=\"s2\">\"#{yesterday.iso8601}\"</span>") expect(body).to include("<span class=\"s2\">\"#{yesterday.iso8601}\"</span>")
expect(body).to include("<span class=\"mi\">#{max_count}</span>") expect(body).to include("<span class=\"mi\">#{max_count}</span>")
expect(body).to include("<span class=\"mi\">#{current_count}</span>") expect(body).to include("<span class=\"mi\">#{current_count}</span>")
......
...@@ -89,7 +89,6 @@ RSpec.describe Gitlab::SeatLinkData do ...@@ -89,7 +89,6 @@ RSpec.describe Gitlab::SeatLinkData do
{ {
gitlab_version: Gitlab::VERSION, gitlab_version: Gitlab::VERSION,
timestamp: timestamp.iso8601, timestamp: timestamp.iso8601,
date: timestamp.to_date.iso8601,
license_key: key, license_key: key,
max_historical_user_count: max_users, max_historical_user_count: max_users,
billable_users_count: billable_users_count, billable_users_count: billable_users_count,
...@@ -108,7 +107,6 @@ RSpec.describe Gitlab::SeatLinkData do ...@@ -108,7 +107,6 @@ RSpec.describe Gitlab::SeatLinkData do
{ {
gitlab_version: Gitlab::VERSION, gitlab_version: Gitlab::VERSION,
timestamp: timestamp.iso8601, timestamp: timestamp.iso8601,
date: timestamp.to_date.iso8601,
license_key: key, license_key: key,
max_historical_user_count: max_users, max_historical_user_count: max_users,
billable_users_count: billable_users_count, billable_users_count: billable_users_count,
......
...@@ -20,7 +20,6 @@ RSpec.describe SyncSeatLinkRequestWorker, type: :worker do ...@@ -20,7 +20,6 @@ RSpec.describe SyncSeatLinkRequestWorker, type: :worker do
body: { body: {
gitlab_version: Gitlab::VERSION, gitlab_version: Gitlab::VERSION,
timestamp: '2019-12-31T23:20:12Z', timestamp: '2019-12-31T23:20:12Z',
date: '2019-12-31',
license_key: '123', license_key: '123',
max_historical_user_count: 5, max_historical_user_count: 5,
billable_users_count: 4, billable_users_count: 4,
...@@ -125,33 +124,6 @@ RSpec.describe SyncSeatLinkRequestWorker, type: :worker do ...@@ -125,33 +124,6 @@ RSpec.describe SyncSeatLinkRequestWorker, type: :worker do
end end
end end
context 'with old date format string' do
subject(:sync_seat_link) do
described_class.new.perform('2020-01-01', '123', 5, 4)
end
it 'makes an HTTP POST request with passed params' do
stub_request(:post, seat_link_url).to_return(status: 200)
sync_seat_link
expect(WebMock).to have_requested(:post, seat_link_url).with(
headers: { 'Content-Type' => 'application/json' },
body: {
gitlab_version: Gitlab::VERSION,
timestamp: '2020-01-01T00:00:00Z',
date: '2020-01-01',
license_key: '123',
max_historical_user_count: 5,
billable_users_count: 4,
hostname: Gitlab.config.gitlab.host,
instance_id: Gitlab::CurrentSettings.uuid,
license_md5: ::License.current.md5
}.to_json
)
end
end
context 'when response contains reconciliation dates' do context 'when response contains reconciliation dates' do
let(:body) { { success: true, next_reconciliation_date: today.to_s, display_alert_from: (today - 7.days).to_s }.to_json } let(:body) { { success: true, next_reconciliation_date: today.to_s, display_alert_from: (today - 7.days).to_s }.to_json }
let(:today) { Date.current } let(:today) { Date.current }
......
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