mirror of
https://github.com/rancher/os.git
synced 2025-09-02 15:24:32 +00:00
isolate and mark platform dependent code
now unit tests compile on OS X and (some of them) work
This commit is contained in:
22
util/util_test.go
Normal file
22
util/util_test.go
Normal file
@@ -0,0 +1,22 @@
|
||||
package util
|
||||
|
||||
import (
|
||||
"github.com/stretchr/testify/require"
|
||||
"strings"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestLoadResourceSimple(t *testing.T) {
|
||||
assert := require.New(t)
|
||||
|
||||
expected := `services:
|
||||
- debian-console
|
||||
- ubuntu-console
|
||||
`
|
||||
expected = strings.TrimSpace(expected)
|
||||
|
||||
b, e := LoadResource("https://raw.githubusercontent.com/rancherio/os-services/v0.3.4/index.yml", true, []string{})
|
||||
|
||||
assert.Nil(e)
|
||||
assert.Equal(expected, strings.TrimSpace(string(b)))
|
||||
}
|
Reference in New Issue
Block a user