network_test.go 439 B

123456789101112131415161718192021222324
  1. package network
  2. import (
  3. "strings"
  4. "testing"
  5. "github.com/stretchr/testify/require"
  6. )
  7. func NoTestLoadResourceSimple(t *testing.T) {
  8. assert := require.New(t)
  9. expected := `services:
  10. - debian-console
  11. - ubuntu-console
  12. `
  13. expected = strings.TrimSpace(expected)
  14. b, e := LoadResource("https://raw.githubusercontent.com/rancher/os-services/v0.3.4/index.yml", true)
  15. assert.Nil(e)
  16. assert.Equal(expected, strings.TrimSpace(string(b)))
  17. }