github.com/rajasrinivasan/spm@v0.0.0-20200125100127-755649755f3f/src/impl/build_test.go (about)

     1  package impl
     2  
     3  import (
     4  	"log"
     5  	"os"
     6  	"testing"
     7  )
     8  
     9  func TestBuild(t *testing.T) {
    10  
    11  	KeepWorkArea = true
    12  	PkgPassword = "Thisisagoodpassword"
    13  	wd, _ := os.Getwd()
    14  	defer os.Chdir(wd)
    15  
    16  	os.Chdir("../../systest")
    17  	Build("sp.yaml", "/tmp/sp.spm")
    18  }
    19  
    20  func TestMakePackageName(t *testing.T) {
    21  	var names = []string{"redirect.yaml", "redirect.cfg", "redirect", "../tests/redirect.yaml"}
    22  	for _, nm := range names {
    23  		pn := makePackageName(nm)
    24  		log.Printf("%s -> %s\n", nm, pn)
    25  	}
    26  }