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

interchangeability_spec.rb « clusters « projects « features « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 0033e12b6b104855242fb69783027248213b70b1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
require 'spec_helper'

describe 'Interchangeability between KubernetesService and Platform::Kubernetes' do
  EXCEPT_METHODS = %i[test title description help fields initialize_properties namespace namespace= api_url api_url= deprecated? deprecation_message].freeze
  EXCEPT_METHODS_GREP_V = %w[_touched? _changed? _was].freeze

  it 'Clusters::Platform::Kubernetes covers core interfaces in KubernetesService' do
    expected_interfaces = KubernetesService.instance_methods(false)
    expected_interfaces = expected_interfaces - EXCEPT_METHODS
    EXCEPT_METHODS_GREP_V.each do |g|
      expected_interfaces = expected_interfaces.grep_v(/#{Regexp.escape(g)}\z/)
    end

    expect(expected_interfaces - Clusters::Platforms::Kubernetes.instance_methods).to be_empty
  end
end