You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
terraform/internal/getmodules/moduleaddrs/detect_gcs_test.go

29 lines
589 B

// Copyright IBM Corp. 2014, 2026
// SPDX-License-Identifier: BUSL-1.1
package moduleaddrs
import (
"testing"
)
func TestDetectGCS(t *testing.T) {
tableTestDetectorFuncs(t, []struct {
Input string
Output string
}{
{
"www.googleapis.com/storage/v1/bucket/foo",
"gcs::https://www.googleapis.com/storage/v1/bucket/foo",
},
{
"www.googleapis.com/storage/v1/bucket/foo/bar",
"gcs::https://www.googleapis.com/storage/v1/bucket/foo/bar",
},
{
"www.googleapis.com/storage/v1/foo/bar.baz",
"gcs::https://www.googleapis.com/storage/v1/foo/bar.baz",
},
})
}