|
| 1 | +// Copyright 2020 The Lokomotive Authors |
| 2 | +// |
| 3 | +// Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | +// you may not use this file except in compliance with the License. |
| 5 | +// You may obtain a copy of the License at |
| 6 | +// |
| 7 | +// http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | +// |
| 9 | +// Unless required by applicable law or agreed to in writing, software |
| 10 | +// distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | +// See the License for the specific language governing permissions and |
| 13 | +// limitations under the License. |
| 14 | + |
| 15 | +// +build aks aws aws_edge packet |
| 16 | +// +build disruptivee2e |
| 17 | + |
| 18 | +package components_test |
| 19 | + |
| 20 | +import ( |
| 21 | + "testing" |
| 22 | + |
| 23 | + "github.com/kinvolk/lokomotive/pkg/components" |
| 24 | + _ "github.com/kinvolk/lokomotive/pkg/components/headlamp" |
| 25 | + "github.com/kinvolk/lokomotive/pkg/components/util" |
| 26 | + testutil "github.com/kinvolk/lokomotive/test/components/util" |
| 27 | +) |
| 28 | + |
| 29 | +func TestDeleteNamespaceMultipleRelease(t *testing.T) { |
| 30 | + n := "headlamp" |
| 31 | + |
| 32 | + c, err := components.Get(n) |
| 33 | + if err != nil { |
| 34 | + t.Fatalf("failed getting component: %v", err) |
| 35 | + } |
| 36 | + |
| 37 | + k := testutil.Kubeconfig(t) |
| 38 | + |
| 39 | + if err := util.UninstallComponent(c, k, true); err == nil { |
| 40 | + t.Fatalf("Deleting component should fail.") |
| 41 | + } |
| 42 | +} |
0 commit comments