use generated charts, remove error code when running make test
parent
5246729910
commit
ce656e9f46
|
@ -202,6 +202,9 @@ NOTE: DNS forwarding is experimental: https://minikube.sigs.k8s.io/docs/handbook
|
||||||
#### validateTunnelDelete
|
#### validateTunnelDelete
|
||||||
stops `minikube tunnel`
|
stops `minikube tunnel`
|
||||||
|
|
||||||
|
## TestGeneratedLogs
|
||||||
|
Verifies logs generated in the /tmp directory
|
||||||
|
|
||||||
## TestGuestEnvironment
|
## TestGuestEnvironment
|
||||||
verifies files and packges installed inside minikube ISO/Base image
|
verifies files and packges installed inside minikube ISO/Base image
|
||||||
|
|
||||||
|
@ -357,7 +360,4 @@ upgrades Kubernetes from oldest to newest
|
||||||
## TestMissingContainerUpgrade
|
## TestMissingContainerUpgrade
|
||||||
tests a Docker upgrade where the underlying container is missing
|
tests a Docker upgrade where the underlying container is missing
|
||||||
|
|
||||||
## TestGeneratedLogs
|
|
||||||
Verifies logs generated in the /tmp directory
|
|
||||||
|
|
||||||
TEST COUNT: 115
|
TEST COUNT: 115
|
|
@ -24,7 +24,6 @@ import (
|
||||||
"os"
|
"os"
|
||||||
"os/exec"
|
"os/exec"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
// "strings"
|
|
||||||
"testing"
|
"testing"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -59,12 +58,18 @@ func TestGeneratedLogs(t *testing.T) {
|
||||||
t.Logf("minikube stderr:\n%s", stderr)
|
t.Logf("minikube stderr:\n%s", stderr)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
logsToBeRemoved, err := filepath.Glob(filepath.Join(logDir, "minikube_*"))
|
||||||
|
if err != nil {
|
||||||
|
t.Error("failed to clean old log files", err)
|
||||||
|
}
|
||||||
|
cleanupLogFiles(t, logsToBeRemoved)
|
||||||
|
|
||||||
logTests := []struct {
|
logTests := []struct {
|
||||||
command string
|
command string
|
||||||
args []string
|
args []string
|
||||||
runCount int // number of times to run command
|
runCount int // number of times to run command
|
||||||
expectedLogFiles int // number of logfiles expected after running command runCount times
|
expectedLogFiles int // number of logfiles expected after running command runCount times
|
||||||
checkReverse bool
|
checkReverse bool // the subcommand can be in the middle, before or after the flags
|
||||||
}{
|
}{
|
||||||
{
|
{
|
||||||
command: "start",
|
command: "start",
|
||||||
|
@ -98,13 +103,6 @@ func TestGeneratedLogs(t *testing.T) {
|
||||||
|
|
||||||
for _, test := range logTests {
|
for _, test := range logTests {
|
||||||
t.Run(test.command, func(t *testing.T) {
|
t.Run(test.command, func(t *testing.T) {
|
||||||
if test.checkReverse {
|
|
||||||
args := []string{"-p", profile, "--log_dir", logDir, test.command}
|
|
||||||
args = append(args, test.args...)
|
|
||||||
} else {
|
|
||||||
args := []string{test.command, "-p", profile, "--log_dir", logDir}
|
|
||||||
args = append(args, test.args...)
|
|
||||||
}
|
|
||||||
|
|
||||||
// before starting the test, ensure no other logs from the current command are written
|
// before starting the test, ensure no other logs from the current command are written
|
||||||
logFiles, err := filepath.Glob(filepath.Join(logDir, fmt.Sprintf("minikube_%s*", test.command)))
|
logFiles, err := filepath.Glob(filepath.Join(logDir, fmt.Sprintf("minikube_%s*", test.command)))
|
||||||
|
|
Loading…
Reference in New Issue