Skip to content

Commit

Permalink
Merge pull request #12 from QiWang19/fix_ci
Browse files Browse the repository at this point in the history
Fix tests failure #11
  • Loading branch information
rhatdan authored Nov 6, 2019
2 parents 03309a8 + 2f433c6 commit 358ea7d
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions pkg/config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,18 @@ var _ = Describe("Config", func() {

It("should succeed with additional devices", func() {
// Given
validDirPath, err := ioutil.TempDir("", "config-empty")
if err != nil {
panic(err)
}
defer os.RemoveAll(validDirPath)

sut.HooksDir = []string{validDirPath}

sut.AdditionalDevices = []string{"/dev/null:/dev/null:rw"}

// When
err := sut.ContainersConfig.Validate(nil, true)
err = sut.ContainersConfig.Validate(nil, true)

// Then
Expect(err).To(BeNil())
Expand Down Expand Up @@ -364,16 +372,6 @@ var _ = Describe("Config", func() {
})

Describe("New", func() {
It("should return default configuration if pass nil path", func() {
// Given
// When
config, err := config.New("")
// Then
Expect(err).To(BeNil())
Expect(config.CgroupManager).To(Equal("systemd"))
Expect(config.PidsLimit).To(BeEquivalentTo(1024))
})

It("should success with valid user file path", func() {
// Given
// When
Expand Down

0 comments on commit 358ea7d

Please sign in to comment.