mirror of
https://github.com/hugomods/docker.git
synced 2025-04-25 12:40:34 +03:00
ci(tests): improve test for resources.GetRemote
This commit is contained in:
parent
8c08180e0b
commit
455fa0767e
1 changed files with 8 additions and 3 deletions
|
@ -1,5 +1,10 @@
|
|||
{{ $api := "https://api.github.com" }}
|
||||
{{ $resp := resources.GetRemote $api }}
|
||||
{{ if not $resp }}
|
||||
{{ errorf "failed to get remote: %s" $api }}
|
||||
{{ with try (resources.GetRemote $api) }}
|
||||
{{ with .Err }}
|
||||
{{ errorf "failed to get remote %s: %s." $api . }}
|
||||
{{ else }}
|
||||
{{ if not .Value }}
|
||||
{{ errorf "failed to get remote: %s" $api }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue