Skip to content

Commit

Permalink
fix: tests needing edition argument
Browse files Browse the repository at this point in the history
  • Loading branch information
lgdd committed Feb 4, 2024
1 parent ab58caa commit f7edac7
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions lfr/pkg/generate/docker/docker_test.go
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
package docker

import (
"github.com/lgdd/liferay-cli/lfr/pkg/generate/workspace"
"github.com/lgdd/liferay-cli/lfr/pkg/project"
"os"
"path/filepath"
"strings"
"testing"

"github.com/lgdd/liferay-cli/lfr/pkg/generate/workspace"
"github.com/lgdd/liferay-cli/lfr/pkg/project"
)

func Test_GenerateDocker_ShouldCreateDockerfileAndCompose(t *testing.T) {
liferayWorkspace := filepath.Join(t.TempDir(), "liferay-workspace")
err := workspace.Generate(liferayWorkspace, project.Gradle, "7.3")
err := workspace.Generate(liferayWorkspace, project.Gradle, "7.3", "portal")
if err != nil {
t.Fatal(err)
}
Expand All @@ -29,7 +30,7 @@ func Test_GenerateDocker_ShouldCreateDockerfileAndCompose(t *testing.T) {

func Test_GenerateDocker_WithMultiStageAndGradle_ShouldContainExpectedStages(t *testing.T) {
liferayWorkspace := filepath.Join(t.TempDir(), "liferay-workspace")
err := workspace.Generate(liferayWorkspace, project.Gradle, "7.3")
err := workspace.Generate(liferayWorkspace, project.Gradle, "7.3", "portal")
if err != nil {
t.Fatal(err)
}
Expand All @@ -52,7 +53,7 @@ func Test_GenerateDocker_WithMultiStageAndGradle_ShouldContainExpectedStages(t *

func Test_GenerateDocker_WithMultiStageAndMaven_ShouldContainExpectedStages(t *testing.T) {
liferayWorkspace := filepath.Join(t.TempDir(), "liferay-workspace")
err := workspace.Generate(liferayWorkspace, project.Maven, "7.3")
err := workspace.Generate(liferayWorkspace, project.Maven, "7.3", "portal")
if err != nil {
t.Fatal(err)
}
Expand All @@ -75,7 +76,7 @@ func Test_GenerateDocker_WithMultiStageAndMaven_ShouldContainExpectedStages(t *t

func Test_GenerateDocker_WithWrongJavaVersion_ShouldFail(t *testing.T) {
liferayWorkspace := filepath.Join(t.TempDir(), "liferay-workspace")
err := workspace.Generate(liferayWorkspace, project.Gradle, "7.3")
err := workspace.Generate(liferayWorkspace, project.Gradle, "7.3", "portal")
if err != nil {
t.Fatal(err)
}
Expand Down

0 comments on commit f7edac7

Please sign in to comment.