Skip to content

Commit

Permalink
fix: add pre-check for obs testing (#106)
Browse files Browse the repository at this point in the history
  • Loading branch information
ShiChangkuo authored Mar 29, 2024
1 parent 863cad3 commit 5d614bc
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions post-processor/huaweicloud-import/obs-util_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ func TestUploadFileToObject(t *testing.T) {
region := os.Getenv("HW_REGION_NAME")
ak := os.Getenv("HW_ACCESS_KEY")
sk := os.Getenv("HW_SECRET_KEY")

if region == "" || ak == "" || sk == "" {
t.Skip("Skipping test because it requires some environment variables")
}

obsEndpoint := fmt.Sprintf("https://obs.%s.myhuaweicloud.com", region)
envProxyConfigure := obs.WithProxyFromEnv(true)

Expand Down

0 comments on commit 5d614bc

Please sign in to comment.