Commit 4a1e1281 authored by Kamil Trzcinski's avatar Kamil Trzcinski

Revert conflicting EE changes

parent 3cb8f01b
......@@ -48,19 +48,6 @@ FactoryGirl.define do
end
end
trait :kubernetes do
after :create do |project|
project.create_kubernetes_service(
active: true,
properties: {
namespace: project.path,
api_url: 'https://kubernetes.example.com/api',
token: 'a' * 40,
}
)
end
end
# Nest Project Feature attributes
transient do
wiki_access_level ProjectFeature::ENABLED
......@@ -150,4 +137,17 @@ FactoryGirl.define do
)
end
end
factory :kubernetes_project, parent: :empty_project do
after :create do |project|
project.create_kubernetes_service(
active: true,
properties: {
namespace: project.path,
api_url: 'https://kubernetes.example.com',
token: 'a' * 40,
}
)
end
end
end
......@@ -4,9 +4,17 @@ describe 'Auto deploy' do
include WaitForAjax
let(:user) { create(:user) }
let(:project) { create(:project, :kubernetes) }
let(:project) { create(:project) }
before do
project.create_kubernetes_service(
active: true,
properties: {
namespace: project.path,
api_url: 'https://kubernetes.example.com',
token: 'a' * 40,
}
)
project.team << [user, :master]
login_as user
end
......
......@@ -93,7 +93,7 @@ feature 'Environment', :feature do
end
context 'with terminal' do
let(:project) { create(:empty_project, :kubernetes, :test_repo) }
let(:project) { create(:kubernetes_project, :test_repo) }
context 'for project master' do
let(:role) { :master }
......
......@@ -151,7 +151,7 @@ feature 'Environments page', :feature, :js do
end
context 'with terminal' do
let(:project) { create(:empty_project, :kubernetes, :test_repo) }
let(:project) { create(:kubernetes_project, :test_repo) }
context 'for project master' do
let(:role) { :master }
......
......@@ -200,7 +200,7 @@ describe Environment, models: true do
context 'when the enviroment is available' do
context 'with a deployment service' do
let(:project) { create(:empty_project, :kubernetes) }
let(:project) { create(:kubernetes_project) }
context 'and a deployment' do
let!(:deployment) { create(:deployment, environment: environment) }
......@@ -218,14 +218,14 @@ describe Environment, models: true do
end
context 'when the environment is unavailable' do
let(:project) { create(:empty_project, :kubernetes) }
let(:project) { create(:kubernetes_project) }
before { environment.stop }
it { is_expected.to be_falsy }
end
end
describe '#terminals' do
let(:project) { create(:empty_project, :kubernetes) }
let(:project) { create(:kubernetes_project) }
subject { environment.terminals }
context 'when the environment has terminals' do
......
......@@ -4,7 +4,7 @@ describe KubernetesService, models: true, caching: true do
include KubernetesHelpers
include ReactiveCachingHelpers
let(:project) { create(:empty_project, :kubernetes) }
let(:project) { create(:kubernetes_project) }
let(:service) { project.kubernetes_service }
# We use Kubeclient to interactive with the Kubernetes API. It will
......
......@@ -1719,7 +1719,7 @@ describe Project, models: true do
end
context 'when project has a deployment service' do
let(:project) { create(:empty_project, :kubernetes) }
let(:project) { create(:kubernetes_project) }
it 'returns variables from this service' do
expect(project.deployment_variables).to include(
......
require 'spec_helper'
describe ReactiveCachingWorker do
let(:project) { create(:empty_project, :kubernetes) }
let(:project) { create(:kubernetes_project) }
let(:service) { project.deployment_service }
subject { described_class.new.perform("KubernetesService", service.id) }
......
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