Skip to content
Permalink
Browse files

fix(brig): remove setting p.Repo fields for non-VCS project

Signed-off-by: Vaughn Dice <vadice@microsoft.com>
  • Loading branch information
vdice committed Jun 19, 2019
1 parent 8d8af75 commit 697a29adb9acc0014f1052cf2216f70448df64de
@@ -87,7 +87,4 @@ func setDefaultValuesNoVCS(p *brigade.Project) {
p.Name = "myproject"
// setting the sidecar to NONE
p.Kubernetes.VCSSidecar = "NONE"
// empty values for the repo
p.Repo.CloneURL = ""
p.Repo.Name = ""
}
@@ -2,7 +2,10 @@ package commands

import (
"os"
"reflect"
"testing"

"github.com/brigadecore/brigade/pkg/brigade"
)

const testProjectSecret = "./testdata/project_secret.json"
@@ -27,12 +30,8 @@ func TestInitProjectNoVCS(t *testing.T) {
t.Fatal("VCSSidecar should be NONE")
}

if p.Repo.CloneURL != "" {
t.Fatal("CloneURL should be an empty string")
}

if p.Repo.Name != "" {
t.Fatal("Repo.Name should be an empty string")
if reflect.DeepEqual(p.Repo, brigade.Repo{}) {
t.Fatal("Project Repo should be empty/unset")
}
}

0 comments on commit 697a29a

Please sign in to comment.
You can’t perform that action at this time.