mirror of
https://github.com/rancher/os.git
synced 2025-06-23 05:27:03 +00:00
23 lines
447 B
Go
23 lines
447 B
Go
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)))
|
|
}
|