2017-11-22 09:21:02 -05:00
|
|
|
require 'spec_helper'
|
|
|
|
|
2018-07-05 02:32:05 -04:00
|
|
|
describe 'Interchangeability between KubernetesService and Platform::Kubernetes' do
|
2018-01-04 04:33:51 -05:00
|
|
|
EXCEPT_METHODS = %i[test title description help fields initialize_properties namespace namespace= api_url api_url= deprecated? deprecation_message].freeze
|
2017-11-27 11:26:14 -05:00
|
|
|
EXCEPT_METHODS_GREP_V = %w[_touched? _changed? _was].freeze
|
2017-11-22 09:21:02 -05:00
|
|
|
|
|
|
|
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
|
2017-11-27 11:26:14 -05:00
|
|
|
|
2017-11-22 09:21:02 -05:00
|
|
|
expect(expected_interfaces - Clusters::Platforms::Kubernetes.instance_methods).to be_empty
|
|
|
|
end
|
|
|
|
end
|