Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integration tests for key-file flag with viewer permission tests #1228

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 6 additions & 0 deletions tools/integration_tests/readonly/readonly_test.go
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