Skip to content
This repository was archived by the owner on Jun 29, 2022. It is now read-only.

Commit 55f3733

Browse files
author
knrt10
committed
Add disruptivee2e for component delete
Headlamp is installed in `lokomotive-system` so deleting it along with namespace should throw error. Signed-off-by: knrt10 <kautilya@kinvolk.io>
1 parent b94acaf commit 55f3733

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
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

Comments
 (0)