Commit ffc41e9b authored by Heinrich Lee Yu's avatar Heinrich Lee Yu Committed by Eugenia Grieff

Fix kubernetes namespace spec

This spec requires a persisted cluster because the `after(:build)` hook
needs it
parent 16d64516
......@@ -61,7 +61,8 @@ RSpec.describe Clusters::KubernetesNamespace, type: :model do
end
describe 'namespace uniqueness validation' do
let(:kubernetes_namespace) { build(:cluster_kubernetes_namespace, namespace: 'my-namespace') }
let_it_be(:cluster) { create(:cluster, :project, :provided_by_gcp) }
let(:kubernetes_namespace) { build(:cluster_kubernetes_namespace, cluster: cluster, namespace: 'my-namespace') }
subject { kubernetes_namespace }
......
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