Param. des variables OCDEPLOY_

This commit is contained in:
admju
2024-09-12 13:12:17 +00:00
parent 3481bccc22
commit 5d4de618dd
8 changed files with 41 additions and 24 deletions

View File

@@ -18,8 +18,8 @@ func TestGetOnline(t *testing.T) {
version := "99.1"
url := fmt.Sprintf("%s/%s/releases/download/%s/oc.json",
occonst.ONLINE_URL,
occonst.ONLINE_VERSION,
occonst.OCDEPLOY_ONLINE_URL,
occonst.OCDEPLOY_ONLINE_REPO,
version)
httpmock.RegisterResponder("GET", url,
@@ -37,16 +37,16 @@ func TestGetOnlineLatest(t *testing.T) {
// version := "99.1"
url := fmt.Sprintf("%s/api/v1/repos/%s/releases/latest",
occonst.ONLINE_URL,
occonst.ONLINE_VERSION)
occonst.OCDEPLOY_ONLINE_URL,
occonst.OCDEPLOY_ONLINE_REPO)
httpmock.RegisterResponder("GET", url,
httpmock.NewStringResponder(200, `{"name": "99.0", "id": 2}`))
version := "99.0"
url2 := fmt.Sprintf("%s/%s/releases/download/%s/oc.json",
occonst.ONLINE_URL,
occonst.ONLINE_VERSION,
occonst.OCDEPLOY_ONLINE_URL,
occonst.OCDEPLOY_ONLINE_REPO,
version)
httpmock.RegisterResponder("GET", url2,