blob: 76b299d18fc00c2c94dc91a6e40484cd58e787ed [file] [log] [blame]
Jack Neus08ccd452019-08-13 09:35:41 -06001// Copyright 2019 The Chromium OS Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4package main
5
6import (
7 "testing"
8
9 "go.chromium.org/chromiumos/infra/go/internal/repo"
10 "gotest.tools/assert"
11)
12
13func TestProjectFetchUrl(t *testing.T) {
14 workingManifest = repo.Manifest{
15 Remotes: []repo.Remote{
16 {Name: "remote", Fetch: "file:///tmp/path/to/remote"},
17 },
18 Projects: []repo.Project{
19 {Path: "foo/bar/project", Name: "foo/bar/project", RemoteName: "remote"},
20 },
21 }
22 url, err := projectFetchUrl("foo/bar/project")
23 assert.NilError(t, err)
24 assert.Equal(t, url, "file:///tmp/path/to/remote/foo/bar/project")
25}