Skip to content
This repository has been archived by the owner on Mar 31, 2023. It is now read-only.

Commit

Permalink
updates to verbose logging testcase
Browse files Browse the repository at this point in the history
  • Loading branch information
D3nn committed May 5, 2020
1 parent 8d61f43 commit 4c49f09
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ jobs:
CREATE_IMAGE: 1
USE_IMAGE: 1
IMAGE_NAME: centos-cloud/centos-7
WKP_DEBUG: true
working_directory: /src/github.com/weaveworks/wksctl
steps:
- checkout
Expand Down Expand Up @@ -269,6 +270,7 @@ jobs:
CREATE_IMAGE: 1
USE_IMAGE: 1
IMAGE_NAME: rhel-cloud/rhel-7
WKP_DEBUG: false
working_directory: /src/github.com/weaveworks/wksctl
steps:
- checkout
Expand Down
11 changes: 10 additions & 1 deletion test/integration/test/apply_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"log"
"os"
"path/filepath"
"strconv"
"testing"
"time"

Expand Down Expand Up @@ -434,7 +435,15 @@ func TestApply(t *testing.T) {
}()

// Install the Cluster.
var verbose = "${DEBUG_LOGGING:-false}"
var verbose bool
val := os.Getenv("WKP_DEBUG")
if val != "" {
verbose, err = strconv.ParseBool(val)
assert.NoErrorf(t, err, "unexpected error parsing boolean: %s\n", err.Error())
} else {
verbose = false
}

run, err := apply(exe, "--cluster="+clusterManifestPath, "--machines="+machinesManifestPath, "--namespace=default",
"--config-directory="+configDir, "--sealed-secret-key="+configPath("ss.key"), "--sealed-secret-cert="+configPath("ss.cert"),
fmt.Sprintf("--verbose=%s", verbose), "--ssh-key="+sshKeyPath)
Expand Down

0 comments on commit 4c49f09

Please sign in to comment.