Commit 9b2857bb authored by Douglas Barbosa Alexandre's avatar Douglas Barbosa Alexandre

Merge branch 'zeitwerk-api-inflection' into 'master'

Fix inconsistent inflection of API module

See merge request gitlab-org/gitlab!26634
parents e09f811a 0af64d36
......@@ -50,7 +50,7 @@ module Clusters
end
def helm_api
@helm_api ||= Gitlab::Kubernetes::Helm::Api.new(kubeclient)
@helm_api ||= Gitlab::Kubernetes::Helm::API.new(kubeclient)
end
def install_command
......
......@@ -10,7 +10,7 @@ describe Clusters::Applications::PrometheusUpdateService do
let(:application) { create(:clusters_applications_prometheus, :installed, cluster: cluster) }
let(:empty_alerts_values_update_yaml) { "---\nalertmanager:\n enabled: false\nserverFiles:\n alerts: {}\n" }
let!(:patch_command) { application.patch_command(empty_alerts_values_update_yaml) }
let(:helm_client) { instance_double(::Gitlab::Kubernetes::Helm::Api) }
let(:helm_client) { instance_double(::Gitlab::Kubernetes::Helm::API) }
subject(:service) { described_class.new(application, project) }
......
......@@ -3,7 +3,7 @@
module Gitlab
module Kubernetes
module Helm
class Api
class API
def initialize(kubeclient)
@kubeclient = kubeclient
@namespace = Gitlab::Kubernetes::Namespace.new(
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe Gitlab::Kubernetes::Helm::Api do
describe Gitlab::Kubernetes::Helm::API do
let(:client) { double('kubernetes client') }
let(:helm) { described_class.new(client) }
let(:gitlab_namespace) { Gitlab::Kubernetes::Helm::NAMESPACE }
......
......@@ -144,7 +144,7 @@ describe Clusters::Applications::CheckInstallationProgressService, '#execute' do
end
it 'removes the installation POD' do
expect_next_instance_of(Gitlab::Kubernetes::Helm::Api) do |instance|
expect_next_instance_of(Gitlab::Kubernetes::Helm::API) do |instance|
expect(instance).to receive(:delete_pod!).with(kind_of(String)).once
end
expect(service).to receive(:remove_installation_pod).and_call_original
......
......@@ -48,7 +48,7 @@ describe Clusters::Applications::CheckUninstallProgressService do
let(:phase) { Gitlab::Kubernetes::Pod::SUCCEEDED }
before do
expect_next_instance_of(Gitlab::Kubernetes::Helm::Api) do |instance|
expect_next_instance_of(Gitlab::Kubernetes::Helm::API) do |instance|
expect(instance).to receive(:delete_pod!).with(kind_of(String)).once
end
expect(service).to receive(:pod_phase).once.and_return(phase)
......
......@@ -7,7 +7,7 @@ describe Clusters::Applications::InstallService do
let(:application) { create(:clusters_applications_helm, :scheduled) }
let!(:install_command) { application.install_command }
let(:service) { described_class.new(application) }
let(:helm_client) { instance_double(Gitlab::Kubernetes::Helm::Api) }
let(:helm_client) { instance_double(Gitlab::Kubernetes::Helm::API) }
before do
allow(service).to receive(:install_command).and_return(install_command)
......
......@@ -7,7 +7,7 @@ describe Clusters::Applications::PatchService do
let(:application) { create(:clusters_applications_knative, :scheduled) }
let!(:update_command) { application.update_command }
let(:service) { described_class.new(application) }
let(:helm_client) { instance_double(Gitlab::Kubernetes::Helm::Api) }
let(:helm_client) { instance_double(Gitlab::Kubernetes::Helm::API) }
before do
allow(service).to receive(:update_command).and_return(update_command)
......
......@@ -5,7 +5,7 @@ require 'spec_helper'
describe Clusters::Applications::UninstallService, '#execute' do
let(:application) { create(:clusters_applications_prometheus, :scheduled) }
let(:service) { described_class.new(application) }
let(:helm_client) { instance_double(Gitlab::Kubernetes::Helm::Api) }
let(:helm_client) { instance_double(Gitlab::Kubernetes::Helm::API) }
let(:worker_class) { Clusters::Applications::WaitForUninstallAppWorker }
before do
......
......@@ -7,7 +7,7 @@ describe Clusters::Applications::UpgradeService do
let(:application) { create(:clusters_applications_helm, :scheduled) }
let!(:install_command) { application.install_command }
let(:service) { described_class.new(application) }
let(:helm_client) { instance_double(Gitlab::Kubernetes::Helm::Api) }
let(:helm_client) { instance_double(Gitlab::Kubernetes::Helm::API) }
before do
allow(service).to receive(:install_command).and_return(install_command)
......
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