Skip to content
This repository was archived by the owner on Sep 9, 2020. It is now read-only.

gps, gps/pkgtree: remove DEPTESTBYPASS501 environment variable #543

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@ matrix:
go: tip
- os: osx
go: 1.8.x
env:
# Flip bit to bypass tests - see dep#501 for more information
- DEPTESTBYPASS501=1
install:
- echo "This is an override of the default install deps step in travis."
before_script:
Expand Down
1 change: 0 additions & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ clone_folder: c:\gopath\src\github.com\golang\dep

environment:
GOPATH: c:\gopath
DEPTESTBYPASS501: 1
matrix:
- environment:
GOVERSION: 1.7.5
Expand Down
7 changes: 1 addition & 6 deletions internal/gps/manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -846,12 +846,7 @@ func TestSupervisor(t *testing.T) {
t.Fatal("running call not recorded in map")
}

// TODO (kris-nova) We need to disable this bypass here, and in the .travis.yml
// as soon as dep#501 is fixed
bypass := os.Getenv("DEPTESTBYPASS501")
if bypass != "" {
t.Log("bypassing tc.count check for running ci")
} else if tc.count != 2 {
if tc.count != 2 {
t.Fatalf("wrong count of running ci: wanted 2 got %v", tc.count)
}
superv.mu.Unlock()
Expand Down
37 changes: 16 additions & 21 deletions internal/gps/pkgtree/pkgtree_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1312,32 +1312,27 @@ func TestListPackages(t *testing.T) {
if !reflect.DeepEqual(out, fix.out) {
// TODO (kris-nova) We need to disable this bypass here, and in the .travis.yml
// as soon as dep#501 is fixed
bypass := os.Getenv("DEPTESTBYPASS501")
if bypass != "" {
t.Log("bypassing fix.out.Packages check < 2")
if len(fix.out.Packages) < 2 {
t.Errorf("Did not get expected PackageOrErrs:\n\t(GOT): %#v\n\t(WNT): %#v", out, fix.out)
} else {
if len(fix.out.Packages) < 2 {
t.Errorf("Did not get expected PackageOrErrs:\n\t(GOT): %#v\n\t(WNT): %#v", out, fix.out)
} else {
seen := make(map[string]bool)
for path, perr := range fix.out.Packages {
seen[path] = true
if operr, exists := out.Packages[path]; !exists {
t.Errorf("Expected PackageOrErr for path %s was missing from output:\n\t%s", path, perr)
} else {
if !reflect.DeepEqual(perr, operr) {
t.Errorf("PkgOrErr for path %s was not as expected:\n\t(GOT): %#v\n\t(WNT): %#v", path, operr, perr)
}
seen := make(map[string]bool)
for path, perr := range fix.out.Packages {
seen[path] = true
if operr, exists := out.Packages[path]; !exists {
t.Errorf("Expected PackageOrErr for path %s was missing from output:\n\t%s", path, perr)
} else {
if !reflect.DeepEqual(perr, operr) {
t.Errorf("PkgOrErr for path %s was not as expected:\n\t(GOT): %#v\n\t(WNT): %#v", path, operr, perr)
}
}
}

for path, operr := range out.Packages {
if seen[path] {
continue
}

t.Errorf("Got PackageOrErr for path %s, but none was expected:\n\t%s", path, operr)
for path, operr := range out.Packages {
if seen[path] {
continue
}

t.Errorf("Got PackageOrErr for path %s, but none was expected:\n\t%s", path, operr)
}
}
}
Expand Down