mirror of
https://github.com/TECHNOFAB11/jsonnet-bundler.git
synced 2025-12-11 23:50:05 +01:00
cmd/jb: Create integration tests for init and install
This commit is contained in:
parent
f71ef86d48
commit
d95948a351
2 changed files with 95 additions and 0 deletions
22
cmd/jb/init_test.go
Normal file
22
cmd/jb/init_test.go
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
// +build integration
|
||||
|
||||
package main
|
||||
|
||||
import (
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestInitCommand(t *testing.T) {
|
||||
tempDir, err := ioutil.TempDir("", "jb-init")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
defer os.Remove(tempDir)
|
||||
|
||||
code := initCommand(tempDir)
|
||||
assert.Equal(t, 0, code)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue