func TestIsRegistry(t *testing.T) {
	testCases := []struct {
		path   string
		result bool
	}{
		{"google.com", false},
		{"https://triggermesh.com/", false},
		{"registry.hub.docker.com/test/testcase", true},
	}
	for _, tc := range testCases {
		result := IsRegistry(tc.path)
		assert.Equal(t, tc.result, result)
	}
}
IsRegistry return true if path "behaves" like URL to docker registry
package file
import (
	"testing"
	"github.com/stretchr/testify/assert"
)
func TestParseManifest(t *testing.T) {
	definition, err := ParseManifest("../../testfiles/serverless-test.yaml")
	assert.NoError(t, err)
	assert.Equal(t, "serverless-foo", definition.Service)
	assert.Equal(t, "serverless.yaml parsing test", definition.Description)
}
func TestRandString(t *testing.T) {
	testCases := []int{1, 2, 3, 10, 0}
	for _, tc := range testCases {
		result := RandString(tc)
		assert.Equal(t, tc, len(result))
	}
}
func TestIsLocal(t *testing.T) {
	testCases := []struct {
		path   string
		result bool
	}{
		{"", false},
		{"/", true},
		{"../../testfiles/cfgfile-test.json", true},
	}
	for _, tc := range testCases {
		result := IsLocal(tc.path)
		assert.Equal(t, tc.result, result)
	}
}
func TestIsRemote(t *testing.T) {
	testCases := []struct {
		path   string
		result bool
	}{
		{"", false},
		{"https://", true},
		{"http://", true},
		{"git@", true},
		{"google.com", true},
		{"google", false},
	}
	for _, tc := range testCases {
		result := IsRemote(tc.path)
		assert.Equal(t, tc.result, result)
	}
}
func TestIsGit(t *testing.T) {
	testCases := []struct {
		path   string
		result bool
	}{
		{"git@", true},  
		{".git", true},  
		{"git@github.com:triggermesh/tm.git", true},
		{"https://github.com/triggermesh/tm.git", true},
		{"https://github.com/triggermesh/tm", true},
		{"github.com/triggermesh/tm", true},
		{"https://triggermesh.com/", false},
		{"some-random-string", false},
	}
	for _, tc := range testCases {
		result := IsGit(tc.path)
		assert.Equal(t, tc.result, result, "isGit(%s) expected to be %v, got %v", tc.path, tc.result, result)
	}
}