2024-11-10 16:08:16 +00:00
|
|
|
package service_definition
|
|
|
|
|
|
|
|
import (
|
|
|
|
"testing"
|
|
|
|
)
|
|
|
|
|
2024-11-14 04:56:19 +00:00
|
|
|
func TestGetPathTypeDetectsGitPathPrefix(t *testing.T) {
|
|
|
|
actual := GetPathType("git+https://test.com")
|
|
|
|
if actual != "git" {
|
|
|
|
t.Errorf("Expected 'git' type, got %s", actual)
|
2024-11-10 16:08:16 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-11-14 04:56:19 +00:00
|
|
|
func TestGetPathTypeDetectsFileNoPrefix(t *testing.T) {
|
|
|
|
actual := GetPathType("file/path.yml")
|
|
|
|
if actual != "file" {
|
|
|
|
t.Errorf("Expected 'file' type, got %s", actual)
|
2024-11-10 16:08:16 +00:00
|
|
|
}
|
|
|
|
}
|