~chipaca/snappy/snappy-tar-pack-mknod

« back to all changes in this revision

Viewing changes to snappy/helpers_test.go

  • Committer: Sergio Schvezov
  • Date: 2014-12-18 11:43:43 UTC
  • Revision ID: sergio.schvezov@canonical.com-20141218114343-2ira9hk6qx97ar7v
Reordering sources and running "goimports -w ."

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
package snappy
2
2
 
3
3
import (
4
 
        "testing"
5
 
        "os/exec"
6
4
        "io/ioutil"
7
5
        "os"
 
6
        "os/exec"
8
7
        "path/filepath"
9
8
        "strings"
 
9
        "testing"
10
10
)
11
11
 
12
12
func TestUnpack(t *testing.T) {
31
31
        if err != nil {
32
32
                t.Error("failed to create tmp archive")
33
33
        }
34
 
        
 
34
 
35
35
        // unpack
36
36
        unpackdir := filepath.Join(tmpdir, "t")
37
37
        err = Unpack(tmpfile, unpackdir)
38
38
        if err != nil {
39
39
                t.Error("unpack failed: %v", err)
40
40
        }
41
 
        
 
41
 
42
42
        _, err = os.Open(filepath.Join(tmpdir, "t/etc/fstab"))
43
43
        if err != nil {
44
44
                t.Error("can not find expected file in unpacked dir")