Skip to content

Commit

Permalink
adding testBucket variable in endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
Tulsishah committed Dec 12, 2024
1 parent 41430f0 commit 28d3d05
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ func (s *chunkTransferTimeoutnInfinity) TestWriteStallCausesDelay(t *testing.T)

func TestChunkTransferTimeoutInfinity(t *testing.T) {
ts := &chunkTransferTimeoutnInfinity{}
proxyEndpoint := fmt.Sprintf("http://localhost:%d/storage/v1/b?project=test-project/b?bucket=test-bucket", Port)
proxyEndpoint := fmt.Sprintf("http://localhost:%d/storage/v1/b?project=test-project/b?bucket=%s", Port, setup.TestBucket())
// Define flag set to run the tests.F
flagsSet := [][]string{
{"--custom-endpoint=" + proxyEndpoint, "--chunk-transfer-timeout-secs=0"},
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
2024/12/12 07:33:31 Proxy server started on port 8020
2024/12/12 07:34:12 Shutting down proxy server...
2024/12/12 07:34:12 Proxy server exiting
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,11 @@ var (

func TestMain(m *testing.M) {
setup.ParseSetUpFlags()
setup.ExitWithFailureIfBothTestBucketAndMountedDirectoryFlagsAreNotSet()

log.Println("Running static mounting tests...")
if setup.MountedDirectory() != "" {
log.Printf("These tests will not run with mounted directory..")
return
}

// Else run tests for testBucket.
// Set up test directory.
Expand Down

0 comments on commit 28d3d05

Please sign in to comment.