-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update go mod with GCS, testing with buildtags, add GCS test
- Loading branch information
Showing
6 changed files
with
56 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"go.buildTags": "include_gcs include_oss" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -223,6 +223,28 @@ func TestAzureStore(t *testing.T) { | |
} | ||
|
||
func TestGCSStore(t *testing.T) { | ||
t.Skip("GCS is not supported yet") | ||
// TODO: test gcs driver | ||
defer func() { | ||
if r := recover(); r != nil { | ||
t.Logf("TestE2e recovered from panic: %v", r) | ||
if fmt.Sprint(r) == "The credentials were not specified in the correct format" { | ||
t.Log("google cloud storage driver initialized and authentication failed as expected") | ||
} else { | ||
t.Fatalf("TestE2e unexpected error: %v", r) | ||
} | ||
} | ||
}() | ||
ut, err := udistribution.NewTransportFromNewConfig("", []string{ | ||
"REGISTRY_STORAGE=gcs", | ||
"REGISTRY_STORAGE_GCS_BUCKET=udistribution-test-e2e", | ||
"REGISTRY_STORAGE_GCS_PROJECT=udistribution-test-e2e", | ||
"REGISTRY_STORAGE_GCS_CREDENTIALS_TYPE=service_account", | ||
"REGISTRY_STORAGE_GCS_CREDENTIALS_PROJECT_ID=udistribution-test-e2e", | ||
"REGISTRY_STORAGE_GCS_CREDENTIALS_PRIVATE_KEY_ID=udistribution-test-e2e", | ||
"REGISTRY_STORAGE_GCS_CREDENTIALS_PRIVATE_KEY=", | ||
"[email protected]", | ||
}) | ||
if err != nil { | ||
t.Fatal(err) | ||
} | ||
ut.Deregister() | ||
} |