mirror of
https://github.com/rancher/os.git
synced 2025-09-01 06:40:31 +00:00
Cache remote repos and service definitions
This commit is contained in:
23
util/network/network_test.go
Normal file
23
util/network/network_test.go
Normal file
@@ -0,0 +1,23 @@
|
||||
package network
|
||||
|
||||
import (
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
func NoTestLoadResourceSimple(t *testing.T) {
|
||||
assert := require.New(t)
|
||||
|
||||
expected := `services:
|
||||
- debian-console
|
||||
- ubuntu-console
|
||||
`
|
||||
expected = strings.TrimSpace(expected)
|
||||
|
||||
b, e := LoadResource("https://raw.githubusercontent.com/rancher/os-services/v0.3.4/index.yml", true)
|
||||
|
||||
assert.Nil(e)
|
||||
assert.Equal(expected, strings.TrimSpace(string(b)))
|
||||
}
|
Reference in New Issue
Block a user