~chipaca/snappy/snappy

« back to all changes in this revision

Viewing changes to snappy/build_test.go

  • Committer: Snappy Tarmac
  • Author(s): John R. Lenton, Michael Vogt, Michael Vogt
  • Date: 2015-05-07 21:12:01 UTC
  • mfrom: (447.2.3 snappy-tar-pack-mknod)
  • Revision ID: snappy_tarmac-20150507211201-tbln3dt7ok0e7rlh
Add support for adding devices in snappy build. by chipaca approved by sergiusens

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
        "os/exec"
24
24
        "path/filepath"
25
25
        "strings"
 
26
        "syscall"
26
27
 
27
28
        "launchpad.net/snappy/helpers"
28
29
 
462
463
        c.Assert(strings.Contains(string(readFiles), `drwxrwxrwx`), Equals, true)
463
464
        c.Assert(strings.Contains(string(readFiles), `-rw-rw-rw-`), Equals, true)
464
465
}
 
466
 
 
467
func (s *SnapTestSuite) TestBuildFailsForUnknownType(c *C) {
 
468
        sourceDir := makeExampleSnapSourceDir(c, `name: hello
 
469
version: 1.0.1
 
470
vendor: Foo <foo@example.com>
 
471
`)
 
472
        err := syscall.Mkfifo(filepath.Join(sourceDir, "fifo"), 0644)
 
473
        c.Assert(err, IsNil)
 
474
 
 
475
        _, err = Build(sourceDir, "")
 
476
        c.Assert(err, ErrorMatches, "can not handle type of file .*")
 
477
}