-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Tullio Sebastiani <[email protected]> test Signed-off-by: Tullio Sebastiani <[email protected]> test fix Signed-off-by: Tullio Sebastiani <[email protected]> utils test Signed-off-by: Tullio Sebastiani <[email protected]>
- Loading branch information
1 parent
88c70b9
commit 81c2561
Showing
11 changed files
with
450 additions
and
6 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
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
File renamed without changes.
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 |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package factory | ||
|
||
import ( | ||
"github.com/krkn-chaos/krknctl/internal/config" | ||
"github.com/krkn-chaos/krknctl/pkg/scenario_orchestrator/docker" | ||
"github.com/krkn-chaos/krknctl/pkg/scenario_orchestrator/models" | ||
"github.com/krkn-chaos/krknctl/pkg/scenario_orchestrator/podman" | ||
"github.com/stretchr/testify/assert" | ||
"testing" | ||
) | ||
|
||
func TestScenarioOrchestratorFactory_NewInstance(t *testing.T) { | ||
typeProviderPodman := &podman.ScenarioOrchestrator{} | ||
typeProviderDocker := &docker.ScenarioOrchestrator{} | ||
conf, err := config.LoadConfig() | ||
assert.Nil(t, err) | ||
assert.NotNil(t, conf) | ||
factory := NewScenarioOrchestratorFactory(conf) | ||
assert.NotNil(t, factory) | ||
scenarioDocker := factory.NewInstance(models.Docker) | ||
assert.NotNil(t, scenarioDocker) | ||
assert.IsType(t, scenarioDocker, typeProviderDocker) | ||
|
||
scenarioPodman := factory.NewInstance(models.Podman) | ||
assert.NotNil(t, scenarioPodman) | ||
assert.IsType(t, scenarioPodman, typeProviderPodman) | ||
|
||
} |
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.