Skip to content
This repository was archived by the owner on Jul 17, 2018. It is now read-only.

Commit e06de20

Browse files
author
Developer Environment
committed
Parameterise path to Jenkins plugins list
1 parent 626dab8 commit e06de20

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

ci/tests/jenkinstest/plugins_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ import (
1010
)
1111

1212
const (
13-
PLUGIN_MANAGER_URL string = "/pluginManager/api/json?depth=1&tree=plugins[shortName,version]"
13+
INSTALLED_PLUGINS_FILE_PATH string = "INSTALLED_PLUGINS_FILE_PATH"
14+
PLUGIN_MANAGER_URL string = "/pluginManager/api/json?depth=1&tree=plugins[shortName,version]"
1415
)
1516

1617
type Plugins struct {
@@ -55,9 +56,8 @@ func getAllInstalledPlugins() (Plugins, error) {
5556

5657
func getAllExpectedPlugins() (Plugins, error) {
5758
var plugins Plugins
58-
filePath, _ := os.Getwd()
5959

60-
p, err := ioutil.ReadFile(filePath + "/../../../src/jenkins/plugins.txt")
60+
p, err := ioutil.ReadFile(os.Getenv(INSTALLED_PLUGINS_FILE_PATH))
6161

6262
if err != nil {
6363
return Plugins{}, fmt.Errorf("%s", err)

0 commit comments

Comments
 (0)