Skip to content

Commit

Permalink
Re-unify test strings
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Eckert committed Oct 31, 2022
1 parent 119ef9f commit 1f36db0
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions cli/cmd/uninstall/uninstall_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,14 @@ import (
"flag"
"fmt"
"io"
"os"
"testing"

apiext "k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
"k8s.io/apimachinery/pkg/runtime/schema"
"k8s.io/client-go/dynamic"
"k8s.io/client-go/kubernetes/fake"
"os"
"testing"

"github.com/hashicorp/consul-k8s/cli/common"
cmnFlag "github.com/hashicorp/consul-k8s/cli/common/flag"
Expand Down Expand Up @@ -654,8 +655,7 @@ func TestUninstall(t *testing.T) {
"\n==> Checking if Consul demo application can be uninstalled\n No existing Consul demo application installation found.\n No existing Consul demo application installation found.\n",
"\n==> Checking if Consul can be uninstalled\n ✓ Existing Consul installation found.\n",
"\n==> Consul Uninstall Summary\n Name: consul\n Namespace: consul\n --> Deleting custom resources managed by Consul\n ✓ Successfully uninstalled Consul Helm release.\n",
"\n==> Other Consul Resources\n Deleting data for installation: \n Name: consul\n Namespace consul",
"\n ✓ No PVCs found.\n ✓ No Consul secrets found.\n ✓ No Consul service accounts found.\n ✓ No Consul roles found.\n ✓ No Consul rolebindings found.\n ✓ No Consul jobs found.\n ✓ No Consul cluster roles found.\n ✓ No Consul cluster role bindings found.\n",
"\n==> Other Consul Resources\n Deleting data for installation: \n Name: consul\n Namespace consul\n ✓ No PVCs found.\n ✓ No Consul secrets found.\n ✓ No Consul service accounts found.\n ✓ No Consul roles found.\n ✓ No Consul rolebindings found.\n ✓ No Consul jobs found.\n ✓ No Consul cluster roles found.\n ✓ No Consul cluster role bindings found.\n",
},
helmActionsRunner: &helm.MockActionRunner{
CheckForInstallationsFunc: func(options *helm.CheckForInstallationsOptions) (bool, string, string, error) {
Expand All @@ -676,8 +676,7 @@ func TestUninstall(t *testing.T) {
input: []string{},
messages: []string{
"\n==> Checking if Consul demo application can be uninstalled\n ✓ Existing Consul demo application installation found.\n",
"\n==> Consul Demo Application Uninstall Summary\n Name: consul-demo\n Namespace: consul-demo",
"\n ✓ Successfully uninstalled Consul demo application Helm release.\n",
"\n==> Consul Demo Application Uninstall Summary\n Name: consul-demo\n Namespace: consul-demo\n ✓ Successfully uninstalled Consul demo application Helm release.\n",
"\n==> Checking if Consul can be uninstalled\n ✓ Existing Consul installation found.\n",
"\n==> Consul Uninstall Summary\n Name: consul\n Namespace: consul\n --> Deleting custom resources managed by Consul\n ✓ Successfully uninstalled Consul Helm release.\n ✓ Skipping deleting PVCs, secrets, and service accounts.\n",
},
Expand Down Expand Up @@ -725,8 +724,7 @@ func TestUninstall(t *testing.T) {
input: []string{},
messages: []string{
"\n==> Checking if Consul demo application can be uninstalled\n ✓ Existing Consul demo application installation found.\n",
"\n==> Consul Demo Application Uninstall Summary\n Name: consul-demo\n Namespace: consul-demo",
"\n ! Helm returned an error.\n",
"\n==> Consul Demo Application Uninstall Summary\n Name: consul-demo\n Namespace: consul-demo\n ! Helm returned an error.\n",
},
helmActionsRunner: &helm.MockActionRunner{
CheckForInstallationsFunc: func(options *helm.CheckForInstallationsOptions) (bool, string, string, error) {
Expand Down

0 comments on commit 1f36db0

Please sign in to comment.