You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by pc...@apache.org on 2023/03/24 10:42:42 UTC
[camel-k] 03/03: Chore: docker unit test
This is an automated email from the ASF dual-hosted git repository.
pcongiusti pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-k.git
commit b1c981bfb60ad40beadd8de8007add91f9c0d85a
Author: Martin Olsiak <ma...@gmail.com>
AuthorDate: Fri Mar 24 09:51:37 2023 +0100
Chore: docker unit test
*Updated TestRunImageArgs to adapt to changes made in RunImageArgs
---
pkg/util/docker/docker_base_test.go | 4 ++--
pkg/util/jvm/keystore_test.go | 6 +++---
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/pkg/util/docker/docker_base_test.go b/pkg/util/docker/docker_base_test.go
index 4456aebdf..23aa58db5 100644
--- a/pkg/util/docker/docker_base_test.go
+++ b/pkg/util/docker/docker_base_test.go
@@ -36,12 +36,12 @@ func TestBuildImageArgs(t *testing.T) {
func TestRunImageArgs(t *testing.T) {
- args, err := RunImageArgs("imagePath", "tag")
+ args, err := RunImageArgs("imagePath")
assert.Nil(t, err)
assert.Equal(t, "run", args[0])
assert.Equal(t, "--network="+NetworkName, args[1])
assert.Equal(t, "-t", args[2])
- assert.Equal(t, "imagePath:tag", args[3])
+ assert.Equal(t, "imagePath:latest", args[3])
}
func TestDockerfilePathArg(t *testing.T) {
diff --git a/pkg/util/jvm/keystore_test.go b/pkg/util/jvm/keystore_test.go
index 251923dbf..3859d79bc 100644
--- a/pkg/util/jvm/keystore_test.go
+++ b/pkg/util/jvm/keystore_test.go
@@ -26,18 +26,18 @@ import (
func TestGenerateKeystore(t *testing.T) {
- //No Data
+ // No Data
var data [][]byte
ctx := context.Background()
err := GenerateKeystore(ctx, "", "name", NewKeystorePassword(), data)
assert.Nil(t, err)
- //Correct input
+ // Correct input
data = [][]byte{{0}, {1}}
err = GenerateKeystore(ctx, "", "name", NewKeystorePassword(), data)
assert.NotNil(t, err)
- //Incorrect input format
+ // Incorrect input format
err = GenerateKeystore(ctx, "", "name", "", data)
assert.NotNil(t, err)
}