Commit 6eb46fb3 authored by Nick Thomas's avatar Nick Thomas

Fix conflicts in KubernetesService and specs

parent 1ced84fe
......@@ -116,16 +116,10 @@ class KubernetesService < DeploymentService
# short time later
def terminals(environment)
with_reactive_cache do |data|
<<<<<<< HEAD
pods = filter_by_label(data[:pods], app: environment.slug)
terminals = pods.flat_map { |pod| terminals_for_pod(api_url, namespace, pod) }
terminals.each { |terminal| add_terminal_auth(terminal, terminal_auth) }
=======
pods = data.fetch(:pods, nil)
filter_pods(pods, app: environment.slug).
flat_map { |pod| terminals_for_pod(api_url, actual_namespace, pod) }.
each { |terminal| add_terminal_auth(terminal, terminal_auth) }
>>>>>>> ce-com/master
end
end
......@@ -133,16 +127,7 @@ class KubernetesService < DeploymentService
with_reactive_cache do |data|
specs = filter_by_label(data[:deployments], app: environment.slug)
<<<<<<< HEAD
::Gitlab::Kubernetes::RolloutStatus.from_specs(*specs)
=======
# Store as hashes, rather than as third-party types
pods = begin
kubeclient.get_pods(namespace: actual_namespace).as_json
rescue KubeException => err
raise err unless err.error_code == 404
[]
>>>>>>> ce-com/master
end
end
......
......@@ -7,8 +7,6 @@ describe KubernetesService, models: true, caching: true do
let(:project) { build_stubbed(:kubernetes_project) }
let(:service) { project.kubernetes_service }
<<<<<<< HEAD
=======
# We use Kubeclient to interactive with the Kubernetes API. It will
# GET /api/v1 for a list of resources the API supports. This must be stubbed
# in addition to any other HTTP requests we expect it to perform.
......@@ -27,7 +25,6 @@ describe KubernetesService, models: true, caching: true do
WebMock.stub_request(:get, pods_url).to_return(pods_response)
end
>>>>>>> ce-com/master
describe "Associations" do
it { is_expected.to belong_to :project }
end
......
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