Commit 7d8814a2 authored by Kamil Trzcinski's avatar Kamil Trzcinski

Fix spec failures

parent a4064c14
...@@ -14,7 +14,7 @@ module Gitlab ...@@ -14,7 +14,7 @@ module Gitlab
end end
def track def track
labels.fetch('track') || 'stable' labels.fetch('track', nil) || 'stable'
end end
def stable? def stable?
......
...@@ -107,7 +107,7 @@ describe Gitlab::Kubernetes::Deployment do ...@@ -107,7 +107,7 @@ describe Gitlab::Kubernetes::Deployment do
context 'with track label' do context 'with track label' do
let(:labels) { { 'track' => track } } let(:labels) { { 'track' => track } }
let(:params) { combine(named('foo'), generation(1, 0), instances(1, 1, 1, labels)) } let(:params) { combine(named('foo', labels), generation(1, 0), instances(1, 1, 1, labels)) }
context 'when marked as stable' do context 'when marked as stable' do
let(:track) { 'stable' } let(:track) { 'stable' }
...@@ -148,7 +148,6 @@ describe Gitlab::Kubernetes::Deployment do ...@@ -148,7 +148,6 @@ describe Gitlab::Kubernetes::Deployment do
def instances(replicas = 4, available = 1, updated = 2, labels = {}) def instances(replicas = 4, available = 1, updated = 2, labels = {})
combine( combine(
named('foo', labels),
make('spec', 'replicas' => replicas), make('spec', 'replicas' => replicas),
make('status', 'availableReplicas' => available, 'updatedReplicas' => updated), make('status', 'availableReplicas' => available, 'updatedReplicas' => updated),
) )
......
...@@ -93,7 +93,7 @@ module KubernetesHelpers ...@@ -93,7 +93,7 @@ module KubernetesHelpers
"labels" => { "labels" => {
"app" => app, "app" => app,
"track" => track "track" => track
}, }.compact,
}, },
"spec" => { "replicas" => 3 }, "spec" => { "replicas" => 3 },
"status" => { "status" => {
......
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