Skip to content

Commit

Permalink
Skip tests that need GCP credentials.
Browse files Browse the repository at this point in the history
  • Loading branch information
ldsnia committed Oct 24, 2023
1 parent 4d91cc4 commit 84f4464
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/acl/gcpacl/checker_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ func TestMain(m *testing.M) {
}

func TestInvalidNoToken(t *testing.T) {
if testing.Short() {
t.Skip("skipping test in short mode: need GCP credentials")
}

ctx := context.Background()
storage := memstorage.New()
gcpCollector := gcpcollector.NewFake(ctx, storage)
Expand All @@ -41,6 +45,9 @@ func TestInvalidNoToken(t *testing.T) {
}

func TestInvalidParseToken(t *testing.T) {
if testing.Short() {
t.Skip("skipping test in short mode: need GCP credentials")
}
ctx := context.Background()
ctx = metadata.NewIncomingContext(ctx, metadata.New(
map[string]string{"Authorization": "QxMzZjMjAyYjhkMjkwNTgwYjE2NWMiLCJ0eXAiOiJKV1QifQ.eyJhdWQiOiIzMjU1NTk0MDU1OS5hcHBzLmdvb2dsZXVzZXJjb250ZW50LmNvbSIsImF6cCI6InNlcnZpY2VhY2NvdW50bmFtZUBzZWMtZXNhbGltYmVuaS1hcGkta2V5LXRlc3QuaWFtLmdzZXJ2aWNlYWNjb3VudC5jb20iLCJlbWFpbCI6InNlcnZpY2VhY2NvdW50bmFtZUBzZWMtZXNhbGltYmVuaS1hcGkta2V5LXRlc3QuaWFtLmdzZXJ2aWNlYWNjb3VudC5jb20iLCJlbWFpbF92ZXJpZmllZCI6dHJ1ZSwiZXhwIjoxNjU5NTIxODcxLCJpYXQiOjE2NTk1MTgyNzEsImlzcyI6Imh0dHBzOi8vYWNjb3VudHMuZ29vZ2xlLmNvbSIsInN1YiI6IjEwNTM5OTA4NzA5OTk1NDg5MDA0MyJ9.LHwLeuAa6jZc7pFPhtFLvsKMg56vPHrm83dfVukLxycopz6CzkpFZoF_DXFRKQ-myQs4KMMd44loi29te5vfnAL9aMXwvySFEcjESOIE_SXPND3Q5FBlfRfWoSLFjGsGhqLhNwKQn-tvjynkdxmtopL4qVmhAFpgTqNA4u8b7l7cWsl3zoudPZMy8mi5pIUetWH5jpj7OaPyv9pVaQ-LaXaLUQkD8bx0bL3Tjhu9yu2IP2Z06jFR9mN-fJ60F05kMJ6Y4HquDXNjm8HCNrXfMGHBcKMUzE3wAaOIG4PoGI81t43dPWpUIUg07RS5tG5uxuWIrgJddxJYpYCWOhGjog"}))
Expand Down

0 comments on commit 84f4464

Please sign in to comment.