From 600d5f4fba4f73ef438db651d20da92080e5b3b0 Mon Sep 17 00:00:00 2001 From: Shinya Maeda Date: Fri, 3 Nov 2017 17:22:49 +0900 Subject: Fix tests. Remove NOT NULL constraint from cluster.user. --- app/models/clusters/platforms/kubernetes.rb | 3 +++ 1 file changed, 3 insertions(+) (limited to 'app/models/clusters') diff --git a/app/models/clusters/platforms/kubernetes.rb b/app/models/clusters/platforms/kubernetes.rb index a33534da8bb..b11701797c2 100644 --- a/app/models/clusters/platforms/kubernetes.rb +++ b/app/models/clusters/platforms/kubernetes.rb @@ -58,6 +58,9 @@ module Clusters def update_kubernetes_integration! raise 'Kubernetes service already configured' unless manages_kubernetes_service? + # This is neccesary, otheriwse enabled? returns true even though cluster updated with enabled: false + cluster.reload + ensure_kubernetes_service&.update!( active: enabled?, api_url: api_url, -- cgit v1.2.1