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

Update example_test.go - fix 10-service.provisioners.yaml #92

Merged
merged 1 commit into from
Mar 6, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions uriget/example_test.go
Original file line number Diff line number Diff line change
@@ -104,7 +104,7 @@ func ExampleWithHttpClient() {
// Output: failed to make get request: Get "https://example.com": no proxy
}
func ExampleGetFile_oci() {
testUrl := "oci://ghcr.io/score-spec/score-compose-community-provisioners:v0.1.0#00-service.provisioners.yaml"
testUrl := "oci://ghcr.io/score-spec/score-compose-community-provisioners:latest#10-service.provisioners.yaml"
buff, err := GetFile(context.Background(), testUrl)
if err != nil {
fmt.Println("failed to pull OCI image:", err)
@@ -116,13 +116,13 @@ func ExampleGetFile_oci() {
}

func ExampleGetFile_oci_git() {
ociTestUrl := "oci://ghcr.io/score-spec/score-compose-community-provisioners:v0.1.0#00-service.provisioners.yaml"
ociTestUrl := "oci://ghcr.io/score-spec/score-compose-community-provisioners:latest#10-service.provisioners.yaml"
ociBuff, err := GetFile(context.Background(), ociTestUrl)
if err != nil {
fmt.Println("failed to pull OCI image:", err)
return
}
gitTestUrl := "git-https://github.com/score-spec/community-provisioners.git/score-compose/00-service.provisioners.yaml"
gitTestUrl := "git-https://github.com/score-spec/community-provisioners.git/score-compose/10-service.provisioners.yaml"
gitBuff, err := GetFile(context.Background(), gitTestUrl)
if err != nil {
fmt.Println("failed to pull file in git:", err)
@@ -134,13 +134,13 @@ func ExampleGetFile_oci_git() {
}

func ExampleGetFile_oci_https() {
ociTestUrl := "oci://ghcr.io/score-spec/score-compose-community-provisioners:v0.1.0#00-service.provisioners.yaml"
ociTestUrl := "oci://ghcr.io/score-spec/score-compose-community-provisioners:latest#10-service.provisioners.yaml"
ociBuff, err := GetFile(context.Background(), ociTestUrl)
if err != nil {
fmt.Println("failed to pull OCI image:", err)
return
}
httpsTestUrl := "https://github.com/score-spec/community-provisioners/raw/v0.1.0/score-compose/00-service.provisioners.yaml"
httpsTestUrl := "https://github.com/score-spec/community-provisioners/raw/main/score-compose/10-service.provisioners.yaml"
httpsbuff, err := GetFile(context.Background(), httpsTestUrl)
if err != nil {
fmt.Println("failed to pull file by HTTPS:", err)