forked from hazelcast/hazelcast-commandline-client
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
53 changed files
with
656 additions
and
246 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -80,9 +80,4 @@ jobs: | |
- name: "Run All Tests" | ||
run: | | ||
make test | ||
- name: "Run Coverage" | ||
run: | | ||
make test-cover | ||
make view-cover | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,3 @@ | ||
//go:build std || viridian | ||
|
||
package viridian_test | ||
|
||
import ( | ||
"context" | ||
"os" | ||
"testing" | ||
|
||
"github.com/stretchr/testify/require" | ||
|
||
"github.com/hazelcast/hazelcast-commandline-client/clc/paths" | ||
"github.com/hazelcast/hazelcast-commandline-client/internal/check" | ||
"github.com/hazelcast/hazelcast-commandline-client/internal/it" | ||
) | ||
|
||
func downloadLogs_NonInteractiveTest(t *testing.T) { | ||
viridianTester(t, func(ctx context.Context, tcx it.TestContext) { | ||
dir := check.MustValue(os.MkdirTemp("", "log")) | ||
defer func() { check.Must(os.RemoveAll(dir)) }() | ||
c := createOrGetClusterWithState(ctx, tcx, "RUNNING") | ||
tcx.WithReset(func() { | ||
tcx.CLCExecute(ctx, "viridian", "download-logs", c.ID, "--output-dir", dir) | ||
tcx.AssertStderrContains("OK") | ||
require.FileExists(t, paths.Join(dir, "node-1.log")) | ||
}) | ||
}) | ||
} | ||
|
||
func downloadLogs_InteractiveTest(t *testing.T) { | ||
viridianTester(t, func(ctx context.Context, tcx it.TestContext) { | ||
dir := check.MustValue(os.MkdirTemp("", "log")) | ||
defer func() { check.Must(os.RemoveAll(dir)) }() | ||
t.Logf("Downloading to directory: %s", dir) | ||
tcx.WithShell(ctx, func(tcx it.TestContext) { | ||
tcx.WithReset(func() { | ||
c := createOrGetClusterWithState(ctx, tcx, "RUNNING") | ||
tcx.WriteStdinf("\\viridian download-logs %s -o %s\n", c.Name, dir) | ||
tcx.AssertStderrContains("OK") | ||
require.FileExists(t, paths.Join(dir, "node-1.log")) | ||
}) | ||
}) | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.