Debian Codegraph @

gcs/gcsfake/bucket_test.go

raw symbols SCIP
1 // Copyright 2015 Google Inc. All Rights Reserved.
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14
15 package gcsfake_testscip-go gomod github.com/jacobsa/gcloud . `github.com/jacobsa/gcloud/gcs/gcsfake_test`/
16
17 import (
18 "testingscip-go gomod github.com/golang/go/src go1.20 testing/"
19 "timescip-go gomod github.com/golang/go/src go1.20 time/"
20
21 "golang.org/x/net/contextscip-go gomod golang.org/x/net fe4d6282115f `golang.org/x/net/context`/"
22
23 "github.com/jacobsa/gcloud/gcs/gcsfakescip-go gomod github.com/jacobsa/gcloud . `github.com/jacobsa/gcloud/gcs/gcsfake`/"
24 "github.com/jacobsa/gcloud/gcs/gcstestingscip-go gomod github.com/jacobsa/gcloud . `github.com/jacobsa/gcloud/gcs/gcstesting`/"
25 "github.com/jacobsa/ogletestscip-go gomod github.com/jacobsa/ogletest 80d50a735a11 `github.com/jacobsa/ogletest`/"
26 "github.com/jacobsa/timeutilscip-go gomod github.com/jacobsa/timeutil 577e5acbbcf6 `github.com/jacobsa/timeutil`/"
27 )
28
29 func TestBucketscip-go gomod github.com/jacobsa/gcloud . `github.com/jacobsa/gcloud/gcs/gcsfake_test`/TestBucket().(t *testingscip-go gomod github.com/golang/go/src go1.20 testing/.Tscip-go gomod github.com/golang/go/src go1.20 testing/T#) { ogletestscip-go gomod github.com/jacobsa/ogletest 80d50a735a11 `github.com/jacobsa/ogletest`/.RunTestsscip-go gomod github.com/jacobsa/ogletest 80d50a735a11 `github.com/jacobsa/ogletest`/RunTests().(t) }
30
31 func initscip-go gomod github.com/jacobsa/gcloud . `github.com/jacobsa/gcloud/gcs/gcsfake_test`/init().() {
32 makeDeps := func(ctx contextscip-go gomod golang.org/x/net fe4d6282115f `golang.org/x/net/context`/.Contextscip-go gomod golang.org/x/net fe4d6282115f `golang.org/x/net/context`/Context#) (deps gcstestingscip-go gomod github.com/jacobsa/gcloud . `github.com/jacobsa/gcloud/gcs/gcstesting`/.BucketTestDepsscip-go gomod github.com/jacobsa/gcloud . `github.com/jacobsa/gcloud/gcs/gcstesting`/BucketTestDeps#) {
33 // Set up a fixed, non-zero time.
34 clock := &timeutilscip-go gomod github.com/jacobsa/timeutil 577e5acbbcf6 `github.com/jacobsa/timeutil`/.SimulatedClockscip-go gomod github.com/jacobsa/timeutil 577e5acbbcf6 `github.com/jacobsa/timeutil`/SimulatedClock#{}
35 clock.SetTimescip-go gomod github.com/jacobsa/timeutil 577e5acbbcf6 `github.com/jacobsa/timeutil`/SimulatedClock#SetTime().(timescip-go gomod github.com/golang/go/src go1.20 time/.Datescip-go gomod github.com/golang/go/src go1.20 time/Date().(2012, 8, 15, 22, 56, 0, 0, timescip-go gomod github.com/golang/go/src go1.20 time/.Localscip-go gomod github.com/golang/go/src go1.20 time/Local.))
36 deps.Clockscip-go gomod github.com/jacobsa/gcloud . `github.com/jacobsa/gcloud/gcs/gcstesting`/BucketTestDeps#Clock. = clock
37
38 // Set up the bucket.
39 deps.Bucketscip-go gomod github.com/jacobsa/gcloud . `github.com/jacobsa/gcloud/gcs/gcstesting`/BucketTestDeps#Bucket. = gcsfakescip-go gomod github.com/jacobsa/gcloud . `github.com/jacobsa/gcloud/gcs/gcsfake`/.NewFakeBucketscip-go gomod github.com/jacobsa/gcloud . `github.com/jacobsa/gcloud/gcs/gcsfake`/NewFakeBucket().(clock, "some_bucket")
40
41 return
42 }
43
44 gcstestingscip-go gomod github.com/jacobsa/gcloud . `github.com/jacobsa/gcloud/gcs/gcstesting`/.RegisterBucketTestsscip-go gomod github.com/jacobsa/gcloud . `github.com/jacobsa/gcloud/gcs/gcstesting`/RegisterBucketTests().(makeDeps)
45 }