-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #42 from ernoaapa/update-containerd
Updated containerd to v1.1.0 and all deps
- Loading branch information
Showing
397 changed files
with
13,466 additions
and
6,447 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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
package runtime | ||
|
||
import ( | ||
"io/ioutil" | ||
"os" | ||
"path/filepath" | ||
"testing" | ||
|
||
"github.com/ernoaapa/eliot/pkg/fs" | ||
"github.com/ernoaapa/eliot/pkg/model" | ||
log "github.com/sirupsen/logrus" | ||
"github.com/stretchr/testify/assert" | ||
) | ||
|
||
func TestEnsureMountSourceDirExistsCreatesDirectory(t *testing.T) { | ||
dir, err := ioutil.TempDir("", "example") | ||
if err != nil { | ||
log.Fatal(err) | ||
} | ||
defer os.RemoveAll(dir) | ||
source := filepath.Join(dir, "temp", "directory") | ||
assert.False(t, fs.DirExist(source)) | ||
assert.NoError(t, ensureMountSourceDirExists([]model.Mount{{Source: source}})) | ||
assert.True(t, fs.DirExist(source)) | ||
} | ||
|
||
func TestEnsureMountSourceDirExistsSkipFiles(t *testing.T) { | ||
dir, err := ioutil.TempDir("", "example") | ||
if err != nil { | ||
log.Fatal(err) | ||
} | ||
defer os.RemoveAll(dir) | ||
source := filepath.Join(dir, "file") | ||
assert.NoError(t, ioutil.WriteFile(source, []byte("foobar"), os.ModePerm)) | ||
|
||
assert.NoError(t, ensureMountSourceDirExists([]model.Mount{{Source: source}})) | ||
} | ||
|
||
func TestGetValues(t *testing.T) { | ||
expected := &model.Pod{} | ||
result := getValues(map[string]*model.Pod{ | ||
"foo": expected, | ||
}) | ||
|
||
assert.Equal(t, []model.Pod{*expected}, result) | ||
} |
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
2 changes: 1 addition & 1 deletion
2
...ub.com/containerd/containerd/LICENSE.code → .../github.com/containerd/containerd/LICENSE
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.