A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/ksonnet/ksonnet/commit/cacbb56b82478921cd3e959f25b094de3aefefc5 below:

Allow forcing a parameter value to string · ksonnet/ksonnet@cacbb56 · GitHub

@@ -28,23 +28,26 @@ func Test_paramSetCmd(t *testing.T) {

28 28

args: []string{"param", "set", "component-name", "param-name", "param-value"},

29 29

action: actionParamSet,

30 30

expected: map[string]interface{}{

31 -

actions.OptionApp: ka,

32 -

actions.OptionName: "component-name",

33 -

actions.OptionPath: "param-name",

34 -

actions.OptionValue: "param-value",

35 -

actions.OptionEnvName: "",

31 +

actions.OptionApp: ka,

32 +

actions.OptionName: "component-name",

33 +

actions.OptionPath: "param-name",

34 +

actions.OptionValue: "param-value",

35 +

actions.OptionEnvName: "",

36 +

actions.OptionAsString: false,

36 37

},

37 38

},

39 + 38 40

{

39 41

name: "set env global",

40 42

args: []string{"param", "set", "param-name", "param-value", "--env", "default"},

41 43

action: actionParamSet,

42 44

expected: map[string]interface{}{

43 -

actions.OptionApp: ka,

44 -

actions.OptionName: "",

45 -

actions.OptionPath: "param-name",

46 -

actions.OptionValue: "param-value",

47 -

actions.OptionEnvName: "default",

45 +

actions.OptionApp: ka,

46 +

actions.OptionName: "",

47 +

actions.OptionPath: "param-name",

48 +

actions.OptionValue: "param-value",

49 +

actions.OptionEnvName: "default",

50 +

actions.OptionAsString: false,

48 51

},

49 52

},

50 53

{

@@ -53,6 +56,19 @@ func Test_paramSetCmd(t *testing.T) {

53 56

action: actionParamSet,

54 57

isErr: true,

55 58

},

59 +

{

60 +

name: "force string value",

61 +

args: []string{"param", "set", "component-name", "param-name", "param-value", "--as-string", "--env", ""},

62 +

action: actionParamSet,

63 +

expected: map[string]interface{}{

64 +

actions.OptionApp: ka,

65 +

actions.OptionName: "component-name",

66 +

actions.OptionPath: "param-name",

67 +

actions.OptionValue: "param-value",

68 +

actions.OptionEnvName: "",

69 +

actions.OptionAsString: true,

70 +

},

71 +

},

56 72

}

57 73 58 74

runTestCmd(t, cases)


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4