(t *testing.T)
| 84 | } |
| 85 | |
| 86 | func TestAppendBasePathTreatsValidPathAsDirectory(t *testing.T) { |
| 87 | tests := []struct { |
| 88 | name string |
| 89 | in string |
| 90 | want string |
| 91 | }{ |
| 92 | {name: "empty", in: "", want: "/"}, |
| 93 | {name: "root", in: "/", want: "/"}, |
| 94 | {name: "directory", in: "/xxl-job-admin/", want: "/xxl-job-admin/"}, |
| 95 | {name: "path without slash", in: "/xxl-job-admin", want: "/xxl-job-admin/"}, |
| 96 | } |
| 97 | |
| 98 | for _, tt := range tests { |
| 99 | t.Run(tt.name, func(t *testing.T) { |
| 100 | if got := appendBasePath(tt.in); got != tt.want { |
| 101 | t.Fatalf("appendBasePath(%q) = %q, want %q", tt.in, got, tt.want) |
| 102 | } |
| 103 | }) |
| 104 | } |
| 105 | } |
| 106 | |
| 107 | func TestAppendDerivationSourcesDoNotCascadePluginOutputs(t *testing.T) { |
| 108 | allowed := []parsers.SpraySource{ |
nothing calls this directly
no test coverage detected