Skip to content

Commit

Permalink
Integration tests for key-file flag with viewer permission tests (#1228)
Browse files Browse the repository at this point in the history
* testing with viewer permission

* testing on operations

* testing on operations

* final testing

* testing

* testing
  • Loading branch information
Tulsishah authored Jul 18, 2023
1 parent 90b9767 commit f396dc5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tools/integration_tests/readonly/readonly_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import (
"strings"
"testing"

"github.com/googlecloudplatform/gcsfuse/tools/integration_tests/util/creds_tests"
"github.com/googlecloudplatform/gcsfuse/tools/integration_tests/util/mounting/static_mounting"
"github.com/googlecloudplatform/gcsfuse/tools/integration_tests/util/setup"
)
Expand Down Expand Up @@ -78,6 +79,11 @@ func TestMain(m *testing.M) {
setup.SetUpTestDirForTestBucketFlag()
successCode := static_mounting.RunTests(flags, m)

if successCode == 0 {
// Test for viewer permission on test bucket.
successCode = creds_tests.RunTestsForKeyFileAndGoogleApplicationCredentialsEnvVarSet(flags, "objectViewer", m)
}

// Delete objects from bucket after testing.
setup.RunScriptForTestData("testdata/delete_objects.sh", setup.TestBucket())

Expand Down

0 comments on commit f396dc5

Please sign in to comment.