2022-11-18 09:57:31 +00:00
|
|
|
package bundle
|
|
|
|
|
|
|
|
import (
|
|
|
|
"os"
|
|
|
|
"testing"
|
|
|
|
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
|
|
"github.com/stretchr/testify/require"
|
|
|
|
)
|
|
|
|
|
|
|
|
func TestLoadNotExists(t *testing.T) {
|
|
|
|
b, err := Load("/doesntexist")
|
|
|
|
assert.True(t, os.IsNotExist(err))
|
|
|
|
assert.Nil(t, b)
|
|
|
|
}
|
|
|
|
|
|
|
|
func TestLoadExists(t *testing.T) {
|
2022-11-28 09:59:43 +00:00
|
|
|
b, err := Load("./tests/basic")
|
2022-11-18 09:57:31 +00:00
|
|
|
require.Nil(t, err)
|
|
|
|
assert.Equal(t, "basic", b.Config.Bundle.Name)
|
|
|
|
}
|