Skip to content

Commit

Permalink
Change authorisation -> authorization when calling GCP APIs
Browse files Browse the repository at this point in the history
  • Loading branch information
asatwal committed Apr 24, 2024
1 parent 303e384 commit e75f6d3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/dfe/analytics/big_query_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def self.events_client
Google::Apis::BigqueryV2::BigqueryService.new
end

@events_client.authorisation = DfE::Analytics::AzureFederatedAuth.gcp_client_credentials
@events_client.authorization = DfE::Analytics::AzureFederatedAuth.gcp_client_credentials
@events_client
end

Expand Down
6 changes: 3 additions & 3 deletions spec/dfe/analytics/big_query_api_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@
end

let(:events_client) { double(:events_client) }
let(:authorisation) { double(:authorisation) }
let(:authorization) { double(:authorization) }

before(:each) do
allow(DfE::Analytics.config).to receive(:azure_federated_auth).and_return(true)

allow(Google::Apis::BigqueryV2::BigqueryService).to receive(:new).and_return(events_client)
allow(DfE::Analytics::AzureFederatedAuth).to receive(:gcp_client_credentials).and_return(authorisation)
allow(events_client).to receive(:authorisation=).and_return(authorisation)
allow(DfE::Analytics::AzureFederatedAuth).to receive(:gcp_client_credentials).and_return(authorization)
allow(events_client).to receive(:authorization=).and_return(authorization)

DfE::Analytics::Testing.webmock!
end
Expand Down

0 comments on commit e75f6d3

Please sign in to comment.