Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(531)

Side by Side Diff: ct/go/util/gs_test.go

Issue 813443002: Overhaul database package (Closed) Base URL: https://skia.googlesource.com/buildbot@master
Patch Set: Comments/readme cleanup Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « README.md ('k') | datahopper/Makefile » ('j') | go/buildbot/db.go » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 package util 1 package util
2 2
3 import ( 3 import (
4 "fmt" 4 "fmt"
5 "io/ioutil" 5 "io/ioutil"
6 "os" 6 "os"
7 "path/filepath" 7 "path/filepath"
8 "testing" 8 "testing"
9 9
10 storage "code.google.com/p/google-api-go-client/storage/v1" 10 storage "code.google.com/p/google-api-go-client/storage/v1"
11 "github.com/stretchr/testify/assert" 11 "github.com/stretchr/testify/assert"
12 "skia.googlesource.com/buildbot.git/go/util" 12 "skia.googlesource.com/buildbot.git/go/util"
13 ) 13 )
14 14
15 func TestDownloadWorkerArtifacts(t *testing.T) { 15 func TestDownloadWorkerArtifacts(t *testing.T) {
16 t.Skip("WARNING: Skipping this test due to https://code.google.com/p/ski a/issues/detail?id=3261")
borenet 2014/12/18 19:12:42 Sorry to do this, but these failures are totally o
rmistry 2014/12/18 19:18:13 Joe, what is the right way to deal with this? we h
borenet 2014/12/18 19:19:22 IMO I should still be able to run the tests withou
16 // Skip if we are running short tests because this test needs a valid 17 // Skip if we are running short tests because this test needs a valid
17 // google_storage_token.data file with read write access. 18 // google_storage_token.data file with read write access.
18 if testing.Short() { 19 if testing.Short() {
19 t.Skip("Skipping test because we are running in short mode.") 20 t.Skip("Skipping test because we are running in short mode.")
20 } 21 }
21 22
22 testPagesetsDirName := filepath.Join("unit-tests", "util", "page_sets") 23 testPagesetsDirName := filepath.Join("unit-tests", "util", "page_sets")
23 client, _ := GetOAuthClient() 24 client, _ := GetOAuthClient()
24 gs, err := NewGsUtil(client) 25 gs, err := NewGsUtil(client)
25 if err != nil { 26 if err != nil {
(...skipping 13 matching lines...) Expand all
39 if err != nil { 40 if err != nil {
40 t.Errorf("Unexpected error: %s", err) 41 t.Errorf("Unexpected error: %s", err)
41 } 42 }
42 assert.Equal(t, 3, len(files)) 43 assert.Equal(t, 3, len(files))
43 assert.Equal(t, "TIMESTAMP", files[0].Name()) 44 assert.Equal(t, "TIMESTAMP", files[0].Name())
44 assert.Equal(t, "alexa1-1.py", files[1].Name()) 45 assert.Equal(t, "alexa1-1.py", files[1].Name())
45 assert.Equal(t, "alexa2-2.py", files[2].Name()) 46 assert.Equal(t, "alexa2-2.py", files[2].Name())
46 } 47 }
47 48
48 func TestUploadWorkerArtifacts(t *testing.T) { 49 func TestUploadWorkerArtifacts(t *testing.T) {
50 t.Skip("WARNING: Skipping this test due to https://code.google.com/p/ski a/issues/detail?id=3261")
49 // Skip if we are running short tests because this test needs a valid 51 // Skip if we are running short tests because this test needs a valid
50 // google_storage_token.data file with read write access. 52 // google_storage_token.data file with read write access.
51 if testing.Short() { 53 if testing.Short() {
52 t.Skip("Skipping test because we are running in short mode.") 54 t.Skip("Skipping test because we are running in short mode.")
53 } 55 }
54 56
55 client, _ := GetOAuthClient() 57 client, _ := GetOAuthClient()
56 gs, err := NewGsUtil(client) 58 gs, err := NewGsUtil(client)
57 if err != nil { 59 if err != nil {
58 t.Errorf("Unexpected error: %s", err) 60 t.Errorf("Unexpected error: %s", err)
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 } 123 }
122 assert.False(t, result3) 124 assert.False(t, result3)
123 125
124 // Test with local timestamp missing. 126 // Test with local timestamp missing.
125 result4, err := gs.AreTimeStampsEqual(tmpDir+"dummy_name", "unit-tests/u til/") 127 result4, err := gs.AreTimeStampsEqual(tmpDir+"dummy_name", "unit-tests/u til/")
126 if err == nil { 128 if err == nil {
127 t.Error("Expected an error") 129 t.Error("Expected an error")
128 } 130 }
129 assert.False(t, result4) 131 assert.False(t, result4)
130 } 132 }
OLDNEW
« no previous file with comments | « README.md ('k') | datahopper/Makefile » ('j') | go/buildbot/db.go » ('J')

Powered by Google App Engine
This is Rietveld 408576698