Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorFilipa Lacerda <filipa@gitlab.com>2017-10-06 12:46:03 +0300
committerFilipa Lacerda <filipa@gitlab.com>2017-10-06 12:46:03 +0300
commit5ced761ebdcb0579377e338c2e321e4ba0373336 (patch)
treed67cc381586fa755fc16809565c4174c6ca28bf0 /spec
parentf71df9f536cc99f5e1626dae7dfe0ab15f7bd258 (diff)
parent638c616296b37b528c1b56f63a818301a502f7aa (diff)
Merge branch 'feature/sm/35954-create-kubernetes-cluster-on-gke-from-k8s-service' of https://gitlab.com/gitlab-org/gitlab-ce into feature/sm/35954-create-kubernetes-cluster-on-gke-from-k8s-service
* 'feature/sm/35954-create-kubernetes-cluster-on-gke-from-k8s-service' of https://gitlab.com/gitlab-org/gitlab-ce: Use utc for time comparision
Diffstat (limited to 'spec')
-rw-r--r--spec/lib/google_api/cloud_platform/client_spec.rb4
-rw-r--r--spec/workers/wait_for_cluster_creation_worker_spec.rb2
2 files changed, 3 insertions, 3 deletions
diff --git a/spec/lib/google_api/cloud_platform/client_spec.rb b/spec/lib/google_api/cloud_platform/client_spec.rb
index 6b454a593a0..6538dc21d6f 100644
--- a/spec/lib/google_api/cloud_platform/client_spec.rb
+++ b/spec/lib/google_api/cloud_platform/client_spec.rb
@@ -7,7 +7,7 @@ describe GoogleApi::CloudPlatform::Client do
describe '#validate_token' do
subject { client.validate_token(expires_at) }
- let(:expires_at) { 1.hour.since.strftime('%s') }
+ let(:expires_at) { 1.hour.since.utc.strftime('%s') }
context 'when token is nil' do
let(:token) { nil }
@@ -26,7 +26,7 @@ describe GoogleApi::CloudPlatform::Client do
end
context 'when expires in 10 minutes' do
- let(:expires_at) { 5.minutes.since.strftime('%s') }
+ let(:expires_at) { 5.minutes.since.utc.strftime('%s') }
it { is_expected.to be_falsy }
end
diff --git a/spec/workers/wait_for_cluster_creation_worker_spec.rb b/spec/workers/wait_for_cluster_creation_worker_spec.rb
index 6d82981287f..dcd4a3b9aec 100644
--- a/spec/workers/wait_for_cluster_creation_worker_spec.rb
+++ b/spec/workers/wait_for_cluster_creation_worker_spec.rb
@@ -24,7 +24,7 @@ describe WaitForClusterCreationWorker do
context 'when operation timeout' do
before do
- allow(operation).to receive(:start_time).and_return(30.minutes.ago)
+ allow(operation).to receive(:start_time).and_return(30.minutes.ago.utc)
end
it 'sets an error message on cluster' do