Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
remyleone committed Apr 23, 2020
1 parent 022a58a commit 475ef26
Showing 1 changed file with 3 additions and 28 deletions.
31 changes: 3 additions & 28 deletions internal/namespaces/object/v1/custom_config_install_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package object

import (
"os"
"path"
"testing"

"github.com/scaleway/scaleway-cli/internal/core"
Expand All @@ -15,15 +14,7 @@ func Test_ConfigInstall(t *testing.T) {
t.Run("rclone", core.Test(&core.TestConfig{
Commands: GetCommands(),
Cmd: "scw object config install type=rclone",
Check: core.TestCheckCombine(
func(t *testing.T, ctx *core.CheckFuncCtx) {
_, err := os.Stat(path.Join(tmpDir, ".config", "rclone", "rclone.conf"))
if err != nil {
t.Fail()
}
},
core.TestCheckExitCode(0),
),
Check: core.TestCheckExitCode(0),
OverrideEnv: map[string]string{
"HOME": tmpDir,
},
Expand All @@ -32,15 +23,7 @@ func Test_ConfigInstall(t *testing.T) {
t.Run("mc", core.Test(&core.TestConfig{
Commands: GetCommands(),
Cmd: "scw object config install type=mc",
Check: core.TestCheckCombine(
func(t *testing.T, ctx *core.CheckFuncCtx) {
_, err := os.Stat(path.Join(tmpDir, ".mc", "config.json"))
if err != nil {
t.Fail()
}
},
core.TestCheckExitCode(0),
),
Check: core.TestCheckExitCode(0),
OverrideEnv: map[string]string{
"HOME": tmpDir,
},
Expand All @@ -49,15 +32,7 @@ func Test_ConfigInstall(t *testing.T) {
t.Run("s3cmd", core.Test(&core.TestConfig{
Commands: GetCommands(),
Cmd: "scw object config install type=s3cmd",
Check: core.TestCheckCombine(
func(t *testing.T, ctx *core.CheckFuncCtx) {
_, err := os.Stat(path.Join(tmpDir, ".s3cfg"))
if err != nil {
t.Fail()
}
},
core.TestCheckExitCode(0),
),
Check: core.TestCheckExitCode(0),
OverrideEnv: map[string]string{
"HOME": tmpDir,
},
Expand Down

0 comments on commit 475ef26

Please sign in to comment.