Skip to content

Commit

Permalink
Chore: docker unit test
Browse files Browse the repository at this point in the history
*Updated TestRunImageArgs to adapt to changes made in RunImageArgs
  • Loading branch information
Martin Olsiak authored and squakez committed Mar 24, 2023
1 parent 3062e68 commit b1c981b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions pkg/util/docker/docker_base_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
6 changes: 3 additions & 3 deletions pkg/util/jvm/keystore_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

0 comments on commit b1c981b

Please sign in to comment.